From 4b60615eae36062ae4d4d5fe89a4e854dc3227ad Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Fri, 4 Nov 2022 17:06:03 +0000 Subject: [PATCH] test/tint: Fix e2e test generation for vec / mat Where the intrinsic uses the fixed-dimension form of the types. Change-Id: I1709382f762fe7394bbd88f428f09b15a1a8a643 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108642 Reviewed-by: Antonio Maiorano Commit-Queue: Ben Clayton Kokoro: Ben Clayton --- test/tint/builtins/gen/gen.wgsl.tmpl | 53 +++++++------ .../builtins/gen/literal/cross/041cb0.wgsl | 2 +- .../cross/041cb0.wgsl.expected.dxc.hlsl | 2 +- .../cross/041cb0.wgsl.expected.fxc.hlsl | 2 +- .../literal/cross/041cb0.wgsl.expected.glsl | 6 +- .../literal/cross/041cb0.wgsl.expected.msl | 2 +- .../literal/cross/041cb0.wgsl.expected.spvasm | 33 ++++---- .../literal/cross/041cb0.wgsl.expected.wgsl | 2 +- .../builtins/gen/literal/cross/9857cb.wgsl | 2 +- .../literal/cross/9857cb.wgsl.expected.wgsl | 2 +- .../gen/literal/pack2x16float/0e97b3.wgsl | 2 +- .../0e97b3.wgsl.expected.dxc.hlsl | 2 +- .../0e97b3.wgsl.expected.fxc.hlsl | 2 +- .../pack2x16float/0e97b3.wgsl.expected.glsl | 6 +- .../pack2x16float/0e97b3.wgsl.expected.msl | 2 +- .../pack2x16float/0e97b3.wgsl.expected.spvasm | 24 +++--- .../pack2x16float/0e97b3.wgsl.expected.wgsl | 2 +- .../gen/literal/pack2x16snorm/6c169b.wgsl | 2 +- .../6c169b.wgsl.expected.dxc.hlsl | 2 +- .../6c169b.wgsl.expected.fxc.hlsl | 2 +- .../pack2x16snorm/6c169b.wgsl.expected.glsl | 6 +- .../pack2x16snorm/6c169b.wgsl.expected.msl | 2 +- .../pack2x16snorm/6c169b.wgsl.expected.spvasm | 24 +++--- .../pack2x16snorm/6c169b.wgsl.expected.wgsl | 2 +- .../gen/literal/pack2x16unorm/0f08e4.wgsl | 2 +- .../0f08e4.wgsl.expected.dxc.hlsl | 2 +- .../0f08e4.wgsl.expected.fxc.hlsl | 2 +- .../pack2x16unorm/0f08e4.wgsl.expected.glsl | 6 +- .../pack2x16unorm/0f08e4.wgsl.expected.msl | 2 +- .../pack2x16unorm/0f08e4.wgsl.expected.spvasm | 24 +++--- .../pack2x16unorm/0f08e4.wgsl.expected.wgsl | 2 +- .../gen/literal/pack4x8snorm/4d22e7.wgsl | 2 +- .../4d22e7.wgsl.expected.dxc.hlsl | 2 +- .../4d22e7.wgsl.expected.fxc.hlsl | 2 +- .../pack4x8snorm/4d22e7.wgsl.expected.glsl | 6 +- .../pack4x8snorm/4d22e7.wgsl.expected.msl | 2 +- .../pack4x8snorm/4d22e7.wgsl.expected.spvasm | 33 ++++---- .../pack4x8snorm/4d22e7.wgsl.expected.wgsl | 2 +- .../gen/literal/pack4x8unorm/95c456.wgsl | 2 +- .../95c456.wgsl.expected.dxc.hlsl | 2 +- .../95c456.wgsl.expected.fxc.hlsl | 2 +- .../pack4x8unorm/95c456.wgsl.expected.glsl | 6 +- .../pack4x8unorm/95c456.wgsl.expected.msl | 2 +- .../pack4x8unorm/95c456.wgsl.expected.spvasm | 33 ++++---- .../pack4x8unorm/95c456.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/0166ec.wgsl | 2 +- .../0166ec.wgsl.expected.dxc.hlsl | 2 +- .../0166ec.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/0166ec.wgsl.expected.glsl | 6 +- .../textureGather/0166ec.wgsl.expected.msl | 2 +- .../textureGather/0166ec.wgsl.expected.spvasm | 24 +++--- .../textureGather/0166ec.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/04fa78.wgsl | 2 +- .../04fa78.wgsl.expected.dxc.hlsl | 2 +- .../04fa78.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/04fa78.wgsl.expected.msl | 2 +- .../textureGather/04fa78.wgsl.expected.spvasm | 42 +++++----- .../textureGather/04fa78.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/10c554.wgsl | 2 +- .../10c554.wgsl.expected.dxc.hlsl | 2 +- .../10c554.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/10c554.wgsl.expected.glsl | 6 +- .../textureGather/10c554.wgsl.expected.msl | 2 +- .../textureGather/10c554.wgsl.expected.spvasm | 20 ++--- .../textureGather/10c554.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/11b2db.wgsl | 2 +- .../11b2db.wgsl.expected.dxc.hlsl | 2 +- .../11b2db.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/11b2db.wgsl.expected.glsl | 6 +- .../textureGather/11b2db.wgsl.expected.msl | 2 +- .../textureGather/11b2db.wgsl.expected.spvasm | 20 ++--- .../textureGather/11b2db.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/17baac.wgsl | 2 +- .../17baac.wgsl.expected.dxc.hlsl | 2 +- .../17baac.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/17baac.wgsl.expected.glsl | 6 +- .../textureGather/17baac.wgsl.expected.msl | 2 +- .../textureGather/17baac.wgsl.expected.spvasm | 39 +++++----- .../textureGather/17baac.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/1bf0ab.wgsl | 2 +- .../1bf0ab.wgsl.expected.dxc.hlsl | 2 +- .../1bf0ab.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/1bf0ab.wgsl.expected.glsl | 6 +- .../textureGather/1bf0ab.wgsl.expected.msl | 2 +- .../textureGather/1bf0ab.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/1bf0ab.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/1f7f6b.wgsl | 2 +- .../1f7f6b.wgsl.expected.dxc.hlsl | 2 +- .../1f7f6b.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/1f7f6b.wgsl.expected.glsl | 6 +- .../textureGather/1f7f6b.wgsl.expected.msl | 2 +- .../textureGather/1f7f6b.wgsl.expected.spvasm | 33 ++++---- .../textureGather/1f7f6b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/22e930.wgsl | 2 +- .../22e930.wgsl.expected.dxc.hlsl | 2 +- .../22e930.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/22e930.wgsl.expected.glsl | 6 +- .../textureGather/22e930.wgsl.expected.msl | 2 +- .../textureGather/22e930.wgsl.expected.spvasm | 39 +++++----- .../textureGather/22e930.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/238ec4.wgsl | 2 +- .../238ec4.wgsl.expected.dxc.hlsl | 2 +- .../238ec4.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/238ec4.wgsl.expected.glsl | 6 +- .../textureGather/238ec4.wgsl.expected.msl | 2 +- .../textureGather/238ec4.wgsl.expected.spvasm | 40 +++++----- .../textureGather/238ec4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/24b0bd.wgsl | 2 +- .../24b0bd.wgsl.expected.dxc.hlsl | 2 +- .../24b0bd.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/24b0bd.wgsl.expected.glsl | 6 +- .../textureGather/24b0bd.wgsl.expected.msl | 2 +- .../textureGather/24b0bd.wgsl.expected.spvasm | 39 +++++----- .../textureGather/24b0bd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/269250.wgsl | 2 +- .../269250.wgsl.expected.dxc.hlsl | 2 +- .../269250.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/269250.wgsl.expected.glsl | 6 +- .../textureGather/269250.wgsl.expected.msl | 2 +- .../textureGather/269250.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/269250.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/2a4f40.wgsl | 2 +- .../2a4f40.wgsl.expected.dxc.hlsl | 2 +- .../2a4f40.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/2a4f40.wgsl.expected.glsl | 6 +- .../textureGather/2a4f40.wgsl.expected.msl | 2 +- .../textureGather/2a4f40.wgsl.expected.spvasm | 39 +++++----- .../textureGather/2a4f40.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/2cc066.wgsl | 2 +- .../2cc066.wgsl.expected.dxc.hlsl | 2 +- .../2cc066.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/2cc066.wgsl.expected.glsl | 6 +- .../textureGather/2cc066.wgsl.expected.msl | 2 +- .../textureGather/2cc066.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/2cc066.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/2e0ed5.wgsl | 2 +- .../2e0ed5.wgsl.expected.dxc.hlsl | 2 +- .../2e0ed5.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/2e0ed5.wgsl.expected.glsl | 6 +- .../textureGather/2e0ed5.wgsl.expected.msl | 2 +- .../textureGather/2e0ed5.wgsl.expected.spvasm | 20 ++--- .../textureGather/2e0ed5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/32c4e8.wgsl | 2 +- .../32c4e8.wgsl.expected.dxc.hlsl | 2 +- .../32c4e8.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/32c4e8.wgsl.expected.glsl | 6 +- .../textureGather/32c4e8.wgsl.expected.msl | 2 +- .../textureGather/32c4e8.wgsl.expected.spvasm | 20 ++--- .../textureGather/32c4e8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/3b32cc.wgsl | 2 +- .../3b32cc.wgsl.expected.dxc.hlsl | 2 +- .../3b32cc.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/3b32cc.wgsl.expected.glsl | 6 +- .../textureGather/3b32cc.wgsl.expected.msl | 2 +- .../textureGather/3b32cc.wgsl.expected.spvasm | 24 +++--- .../textureGather/3b32cc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/43025d.wgsl | 2 +- .../43025d.wgsl.expected.dxc.hlsl | 2 +- .../43025d.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/43025d.wgsl.expected.msl | 2 +- .../textureGather/43025d.wgsl.expected.spvasm | 38 +++++----- .../textureGather/43025d.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/445793.wgsl | 2 +- .../445793.wgsl.expected.dxc.hlsl | 2 +- .../445793.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/445793.wgsl.expected.glsl | 6 +- .../textureGather/445793.wgsl.expected.msl | 2 +- .../textureGather/445793.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/445793.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/49b07f.wgsl | 2 +- .../49b07f.wgsl.expected.dxc.hlsl | 2 +- .../49b07f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/49b07f.wgsl.expected.glsl | 6 +- .../textureGather/49b07f.wgsl.expected.msl | 2 +- .../textureGather/49b07f.wgsl.expected.spvasm | 26 +++---- .../textureGather/49b07f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/4b8103.wgsl | 2 +- .../4b8103.wgsl.expected.dxc.hlsl | 2 +- .../4b8103.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/4b8103.wgsl.expected.glsl | 6 +- .../textureGather/4b8103.wgsl.expected.msl | 2 +- .../textureGather/4b8103.wgsl.expected.spvasm | 41 +++++----- .../textureGather/4b8103.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/4e8ac5.wgsl | 2 +- .../4e8ac5.wgsl.expected.dxc.hlsl | 2 +- .../4e8ac5.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/4e8ac5.wgsl.expected.glsl | 6 +- .../textureGather/4e8ac5.wgsl.expected.msl | 2 +- .../textureGather/4e8ac5.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/4e8ac5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/5266da.wgsl | 2 +- .../5266da.wgsl.expected.dxc.hlsl | 2 +- .../5266da.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/5266da.wgsl.expected.glsl | 6 +- .../textureGather/5266da.wgsl.expected.msl | 2 +- .../textureGather/5266da.wgsl.expected.spvasm | 20 ++--- .../textureGather/5266da.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/59372a.wgsl | 2 +- .../59372a.wgsl.expected.dxc.hlsl | 2 +- .../59372a.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/59372a.wgsl.expected.glsl | 6 +- .../textureGather/59372a.wgsl.expected.msl | 2 +- .../textureGather/59372a.wgsl.expected.spvasm | 41 +++++----- .../textureGather/59372a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/5ba85f.wgsl | 2 +- .../5ba85f.wgsl.expected.dxc.hlsl | 2 +- .../5ba85f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/5ba85f.wgsl.expected.glsl | 6 +- .../textureGather/5ba85f.wgsl.expected.msl | 2 +- .../textureGather/5ba85f.wgsl.expected.spvasm | 24 +++--- .../textureGather/5ba85f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/5bd491.wgsl | 2 +- .../5bd491.wgsl.expected.dxc.hlsl | 2 +- .../5bd491.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/5bd491.wgsl.expected.glsl | 6 +- .../textureGather/5bd491.wgsl.expected.msl | 2 +- .../textureGather/5bd491.wgsl.expected.spvasm | 24 +++--- .../textureGather/5bd491.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/6b7b74.wgsl | 2 +- .../6b7b74.wgsl.expected.dxc.hlsl | 2 +- .../6b7b74.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/6b7b74.wgsl.expected.glsl | 6 +- .../textureGather/6b7b74.wgsl.expected.msl | 2 +- .../textureGather/6b7b74.wgsl.expected.spvasm | 44 ++++++----- .../textureGather/6b7b74.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/751f8a.wgsl | 2 +- .../751f8a.wgsl.expected.dxc.hlsl | 2 +- .../751f8a.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/751f8a.wgsl.expected.msl | 2 +- .../textureGather/751f8a.wgsl.expected.spvasm | 38 +++++----- .../textureGather/751f8a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/788010.wgsl | 2 +- .../788010.wgsl.expected.dxc.hlsl | 2 +- .../788010.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/788010.wgsl.expected.msl | 2 +- .../textureGather/788010.wgsl.expected.spvasm | 42 +++++----- .../textureGather/788010.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/7c3828.wgsl | 2 +- .../7c3828.wgsl.expected.dxc.hlsl | 2 +- .../7c3828.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/7c3828.wgsl.expected.glsl | 6 +- .../textureGather/7c3828.wgsl.expected.msl | 2 +- .../textureGather/7c3828.wgsl.expected.spvasm | 26 +++---- .../textureGather/7c3828.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/7dd226.wgsl | 2 +- .../7dd226.wgsl.expected.dxc.hlsl | 2 +- .../7dd226.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/7dd226.wgsl.expected.msl | 2 +- .../textureGather/7dd226.wgsl.expected.spvasm | 38 +++++----- .../textureGather/7dd226.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/829357.wgsl | 2 +- .../829357.wgsl.expected.dxc.hlsl | 2 +- .../829357.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/829357.wgsl.expected.msl | 2 +- .../textureGather/829357.wgsl.expected.spvasm | 38 +++++----- .../textureGather/829357.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/831549.wgsl | 2 +- .../831549.wgsl.expected.dxc.hlsl | 2 +- .../831549.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/831549.wgsl.expected.glsl | 6 +- .../textureGather/831549.wgsl.expected.msl | 2 +- .../textureGather/831549.wgsl.expected.spvasm | 41 +++++----- .../textureGather/831549.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/8578bc.wgsl | 2 +- .../8578bc.wgsl.expected.dxc.hlsl | 2 +- .../8578bc.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/8578bc.wgsl.expected.msl | 2 +- .../textureGather/8578bc.wgsl.expected.spvasm | 38 +++++----- .../textureGather/8578bc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/89680f.wgsl | 2 +- .../89680f.wgsl.expected.dxc.hlsl | 2 +- .../89680f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/89680f.wgsl.expected.glsl | 6 +- .../textureGather/89680f.wgsl.expected.msl | 2 +- .../textureGather/89680f.wgsl.expected.spvasm | 24 +++--- .../textureGather/89680f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/8b754c.wgsl | 2 +- .../8b754c.wgsl.expected.dxc.hlsl | 2 +- .../8b754c.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/8b754c.wgsl.expected.glsl | 6 +- .../textureGather/8b754c.wgsl.expected.msl | 2 +- .../textureGather/8b754c.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/8b754c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/8fae00.wgsl | 2 +- .../8fae00.wgsl.expected.dxc.hlsl | 2 +- .../8fae00.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/8fae00.wgsl.expected.glsl | 6 +- .../textureGather/8fae00.wgsl.expected.msl | 2 +- .../textureGather/8fae00.wgsl.expected.spvasm | 24 +++--- .../textureGather/8fae00.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/92ea47.wgsl | 2 +- .../92ea47.wgsl.expected.dxc.hlsl | 2 +- .../92ea47.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/92ea47.wgsl.expected.glsl | 6 +- .../textureGather/92ea47.wgsl.expected.msl | 2 +- .../textureGather/92ea47.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/92ea47.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/986700.wgsl | 2 +- .../986700.wgsl.expected.dxc.hlsl | 2 +- .../986700.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/986700.wgsl.expected.glsl | 6 +- .../textureGather/986700.wgsl.expected.msl | 2 +- .../textureGather/986700.wgsl.expected.spvasm | 37 ++++----- .../textureGather/986700.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/9a6358.wgsl | 2 +- .../9a6358.wgsl.expected.dxc.hlsl | 2 +- .../9a6358.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/9a6358.wgsl.expected.glsl | 6 +- .../textureGather/9a6358.wgsl.expected.msl | 2 +- .../textureGather/9a6358.wgsl.expected.spvasm | 39 +++++----- .../textureGather/9a6358.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/9ab41e.wgsl | 2 +- .../9ab41e.wgsl.expected.dxc.hlsl | 2 +- .../9ab41e.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/9ab41e.wgsl.expected.glsl | 6 +- .../textureGather/9ab41e.wgsl.expected.msl | 2 +- .../textureGather/9ab41e.wgsl.expected.spvasm | 45 ++++++----- .../textureGather/9ab41e.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/a0372b.wgsl | 2 +- .../a0372b.wgsl.expected.dxc.hlsl | 2 +- .../a0372b.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/a0372b.wgsl.expected.glsl | 6 +- .../textureGather/a0372b.wgsl.expected.msl | 2 +- .../textureGather/a0372b.wgsl.expected.spvasm | 43 ++++++----- .../textureGather/a0372b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/a68027.wgsl | 2 +- .../a68027.wgsl.expected.dxc.hlsl | 2 +- .../a68027.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/a68027.wgsl.expected.glsl | 6 +- .../textureGather/a68027.wgsl.expected.msl | 2 +- .../textureGather/a68027.wgsl.expected.spvasm | 40 +++++----- .../textureGather/a68027.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/aaf6bd.wgsl | 2 +- .../aaf6bd.wgsl.expected.dxc.hlsl | 2 +- .../aaf6bd.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/aaf6bd.wgsl.expected.msl | 2 +- .../textureGather/aaf6bd.wgsl.expected.spvasm | 42 +++++----- .../textureGather/aaf6bd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/af55b3.wgsl | 2 +- .../af55b3.wgsl.expected.dxc.hlsl | 2 +- .../af55b3.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/af55b3.wgsl.expected.glsl | 6 +- .../textureGather/af55b3.wgsl.expected.msl | 2 +- .../textureGather/af55b3.wgsl.expected.spvasm | 22 +++--- .../textureGather/af55b3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/bb3ac5.wgsl | 2 +- .../bb3ac5.wgsl.expected.dxc.hlsl | 2 +- .../bb3ac5.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/bb3ac5.wgsl.expected.glsl | 6 +- .../textureGather/bb3ac5.wgsl.expected.msl | 2 +- .../textureGather/bb3ac5.wgsl.expected.spvasm | 24 +++--- .../textureGather/bb3ac5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/bd33b6.wgsl | 2 +- .../bd33b6.wgsl.expected.dxc.hlsl | 2 +- .../bd33b6.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/bd33b6.wgsl.expected.glsl | 6 +- .../textureGather/bd33b6.wgsl.expected.msl | 2 +- .../textureGather/bd33b6.wgsl.expected.spvasm | 45 ++++++----- .../textureGather/bd33b6.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/be276f.wgsl | 2 +- .../be276f.wgsl.expected.dxc.hlsl | 2 +- .../be276f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/be276f.wgsl.expected.msl | 2 +- .../textureGather/be276f.wgsl.expected.spvasm | 42 +++++----- .../textureGather/be276f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/c0640c.wgsl | 2 +- .../c0640c.wgsl.expected.dxc.hlsl | 2 +- .../c0640c.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/c0640c.wgsl.expected.msl | 2 +- .../textureGather/c0640c.wgsl.expected.spvasm | 42 +++++----- .../textureGather/c0640c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/ccadde.wgsl | 2 +- .../ccadde.wgsl.expected.dxc.hlsl | 2 +- .../ccadde.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/ccadde.wgsl.expected.glsl | 6 +- .../textureGather/ccadde.wgsl.expected.msl | 2 +- .../textureGather/ccadde.wgsl.expected.spvasm | 24 +++--- .../textureGather/ccadde.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/ce5578.wgsl | 2 +- .../ce5578.wgsl.expected.dxc.hlsl | 2 +- .../ce5578.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/ce5578.wgsl.expected.glsl | 6 +- .../textureGather/ce5578.wgsl.expected.msl | 2 +- .../textureGather/ce5578.wgsl.expected.spvasm | 45 ++++++----- .../textureGather/ce5578.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/cf9112.wgsl | 2 +- .../cf9112.wgsl.expected.dxc.hlsl | 2 +- .../cf9112.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/cf9112.wgsl.expected.glsl | 6 +- .../textureGather/cf9112.wgsl.expected.msl | 2 +- .../textureGather/cf9112.wgsl.expected.spvasm | 44 ++++++----- .../textureGather/cf9112.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/d1f187.wgsl | 2 +- .../d1f187.wgsl.expected.dxc.hlsl | 2 +- .../d1f187.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d1f187.wgsl.expected.glsl | 6 +- .../textureGather/d1f187.wgsl.expected.msl | 2 +- .../textureGather/d1f187.wgsl.expected.spvasm | 45 ++++++----- .../textureGather/d1f187.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/d4b5c6.wgsl | 2 +- .../d4b5c6.wgsl.expected.dxc.hlsl | 2 +- .../d4b5c6.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d4b5c6.wgsl.expected.msl | 2 +- .../textureGather/d4b5c6.wgsl.expected.spvasm | 42 +++++----- .../textureGather/d4b5c6.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/d6507c.wgsl | 2 +- .../d6507c.wgsl.expected.dxc.hlsl | 2 +- .../d6507c.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d6507c.wgsl.expected.glsl | 6 +- .../textureGather/d6507c.wgsl.expected.msl | 2 +- .../textureGather/d6507c.wgsl.expected.spvasm | 33 ++++---- .../textureGather/d6507c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/d8e958.wgsl | 2 +- .../d8e958.wgsl.expected.dxc.hlsl | 2 +- .../d8e958.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d8e958.wgsl.expected.glsl | 6 +- .../textureGather/d8e958.wgsl.expected.msl | 2 +- .../textureGather/d8e958.wgsl.expected.spvasm | 20 ++--- .../textureGather/d8e958.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/d90605.wgsl | 2 +- .../d90605.wgsl.expected.dxc.hlsl | 2 +- .../d90605.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d90605.wgsl.expected.glsl | 6 +- .../textureGather/d90605.wgsl.expected.msl | 2 +- .../textureGather/d90605.wgsl.expected.spvasm | 41 +++++----- .../textureGather/d90605.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/d98d59.wgsl | 2 +- .../d98d59.wgsl.expected.dxc.hlsl | 2 +- .../d98d59.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d98d59.wgsl.expected.msl | 2 +- .../textureGather/d98d59.wgsl.expected.spvasm | 38 +++++----- .../textureGather/d98d59.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/dc6661.wgsl | 2 +- .../dc6661.wgsl.expected.dxc.hlsl | 2 +- .../dc6661.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/dc6661.wgsl.expected.glsl | 6 +- .../textureGather/dc6661.wgsl.expected.msl | 2 +- .../textureGather/dc6661.wgsl.expected.spvasm | 37 ++++----- .../textureGather/dc6661.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/e2acac.wgsl | 2 +- .../e2acac.wgsl.expected.dxc.hlsl | 2 +- .../e2acac.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/e2acac.wgsl.expected.msl | 2 +- .../textureGather/e2acac.wgsl.expected.spvasm | 42 +++++----- .../textureGather/e2acac.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/e3165f.wgsl | 2 +- .../e3165f.wgsl.expected.dxc.hlsl | 2 +- .../e3165f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/e3165f.wgsl.expected.glsl | 6 +- .../textureGather/e3165f.wgsl.expected.msl | 2 +- .../textureGather/e3165f.wgsl.expected.spvasm | 45 ++++++----- .../textureGather/e3165f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/e9d390.wgsl | 2 +- .../e9d390.wgsl.expected.dxc.hlsl | 2 +- .../e9d390.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/e9d390.wgsl.expected.glsl | 6 +- .../textureGather/e9d390.wgsl.expected.msl | 2 +- .../textureGather/e9d390.wgsl.expected.spvasm | 45 ++++++----- .../textureGather/e9d390.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/ea8eb4.wgsl | 2 +- .../ea8eb4.wgsl.expected.dxc.hlsl | 2 +- .../ea8eb4.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/ea8eb4.wgsl.expected.glsl | 6 +- .../textureGather/ea8eb4.wgsl.expected.msl | 2 +- .../textureGather/ea8eb4.wgsl.expected.spvasm | 39 +++++----- .../textureGather/ea8eb4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureGather/f2c6e3.wgsl | 2 +- .../f2c6e3.wgsl.expected.dxc.hlsl | 2 +- .../f2c6e3.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/f2c6e3.wgsl.expected.msl | 2 +- .../textureGather/f2c6e3.wgsl.expected.spvasm | 42 +++++----- .../textureGather/f2c6e3.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/144a9a.wgsl | 2 +- .../144a9a.wgsl.expected.dxc.hlsl | 2 +- .../144a9a.wgsl.expected.fxc.hlsl | 2 +- .../144a9a.wgsl.expected.glsl | 6 +- .../144a9a.wgsl.expected.msl | 2 +- .../144a9a.wgsl.expected.spvasm | 40 +++++----- .../144a9a.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/182fd4.wgsl | 2 +- .../182fd4.wgsl.expected.dxc.hlsl | 2 +- .../182fd4.wgsl.expected.fxc.hlsl | 2 +- .../182fd4.wgsl.expected.glsl | 6 +- .../182fd4.wgsl.expected.msl | 2 +- .../182fd4.wgsl.expected.spvasm | 4 +- .../182fd4.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/2e409c.wgsl | 2 +- .../2e409c.wgsl.expected.dxc.hlsl | 2 +- .../2e409c.wgsl.expected.fxc.hlsl | 2 +- .../2e409c.wgsl.expected.msl | 2 +- .../2e409c.wgsl.expected.spvasm | 38 +++++----- .../2e409c.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/313add.wgsl | 2 +- .../313add.wgsl.expected.dxc.hlsl | 2 +- .../313add.wgsl.expected.fxc.hlsl | 2 +- .../313add.wgsl.expected.glsl | 6 +- .../313add.wgsl.expected.msl | 2 +- .../313add.wgsl.expected.spvasm | 31 ++++---- .../313add.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/60d2d1.wgsl | 2 +- .../60d2d1.wgsl.expected.dxc.hlsl | 2 +- .../60d2d1.wgsl.expected.fxc.hlsl | 2 +- .../60d2d1.wgsl.expected.msl | 2 +- .../60d2d1.wgsl.expected.spvasm | 38 +++++----- .../60d2d1.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/6d9352.wgsl | 2 +- .../6d9352.wgsl.expected.dxc.hlsl | 2 +- .../6d9352.wgsl.expected.fxc.hlsl | 2 +- .../6d9352.wgsl.expected.glsl | 6 +- .../6d9352.wgsl.expected.msl | 2 +- .../6d9352.wgsl.expected.spvasm | 4 +- .../6d9352.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/783e65.wgsl | 2 +- .../783e65.wgsl.expected.dxc.hlsl | 2 +- .../783e65.wgsl.expected.fxc.hlsl | 2 +- .../783e65.wgsl.expected.glsl | 6 +- .../783e65.wgsl.expected.msl | 2 +- .../783e65.wgsl.expected.spvasm | 39 +++++----- .../783e65.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/b5bc43.wgsl | 2 +- .../b5bc43.wgsl.expected.dxc.hlsl | 2 +- .../b5bc43.wgsl.expected.fxc.hlsl | 2 +- .../b5bc43.wgsl.expected.glsl | 6 +- .../b5bc43.wgsl.expected.msl | 2 +- .../b5bc43.wgsl.expected.spvasm | 39 +++++----- .../b5bc43.wgsl.expected.wgsl | 2 +- .../literal/textureGatherCompare/f585cc.wgsl | 2 +- .../f585cc.wgsl.expected.dxc.hlsl | 2 +- .../f585cc.wgsl.expected.fxc.hlsl | 2 +- .../f585cc.wgsl.expected.glsl | 6 +- .../f585cc.wgsl.expected.msl | 2 +- .../f585cc.wgsl.expected.spvasm | 41 +++++----- .../f585cc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/019da0.wgsl | 2 +- .../textureLoad/019da0.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/019da0.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/019da0.wgsl.expected.glsl | 6 +- .../textureLoad/019da0.wgsl.expected.msl | 2 +- .../textureLoad/019da0.wgsl.expected.spvasm | 29 +++---- .../textureLoad/019da0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/026217.wgsl | 2 +- .../textureLoad/026217.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/026217.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/026217.wgsl.expected.glsl | 6 +- .../textureLoad/026217.wgsl.expected.msl | 2 +- .../textureLoad/026217.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/026217.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/04b911.wgsl | 2 +- .../textureLoad/04b911.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/04b911.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/04b911.wgsl.expected.glsl | 6 +- .../textureLoad/04b911.wgsl.expected.msl | 2 +- .../textureLoad/04b911.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/04b911.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/168dc8.wgsl | 2 +- .../textureLoad/168dc8.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/168dc8.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/168dc8.wgsl.expected.glsl | 6 +- .../textureLoad/168dc8.wgsl.expected.msl | 2 +- .../textureLoad/168dc8.wgsl.expected.spvasm | 40 +++++----- .../textureLoad/168dc8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/19cf87.wgsl | 2 +- .../textureLoad/19cf87.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/19cf87.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/19cf87.wgsl.expected.glsl | 6 +- .../textureLoad/19cf87.wgsl.expected.msl | 2 +- .../textureLoad/19cf87.wgsl.expected.spvasm | 4 +- .../textureLoad/19cf87.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/1b051f.wgsl | 2 +- .../textureLoad/1b051f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1b051f.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/1b051f.wgsl.expected.glsl | 6 +- .../textureLoad/1b051f.wgsl.expected.msl | 2 +- .../textureLoad/1b051f.wgsl.expected.spvasm | 40 +++++----- .../textureLoad/1b051f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/1bfdfb.wgsl | 2 +- .../textureLoad/1bfdfb.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1bfdfb.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/1bfdfb.wgsl.expected.glsl | 6 +- .../textureLoad/1bfdfb.wgsl.expected.msl | 2 +- .../textureLoad/1bfdfb.wgsl.expected.spvasm | 2 +- .../textureLoad/1bfdfb.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/1c562a.wgsl | 2 +- .../textureLoad/1c562a.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1c562a.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/1c562a.wgsl.expected.glsl | 6 +- .../textureLoad/1c562a.wgsl.expected.msl | 2 +- .../textureLoad/1c562a.wgsl.expected.spvasm | 4 +- .../textureLoad/1c562a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/1f2016.wgsl | 2 +- .../textureLoad/1f2016.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1f2016.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/1f2016.wgsl.expected.glsl | 6 +- .../textureLoad/1f2016.wgsl.expected.msl | 2 +- .../textureLoad/1f2016.wgsl.expected.spvasm | 4 +- .../textureLoad/1f2016.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/21d1c4.wgsl | 2 +- .../textureLoad/21d1c4.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/21d1c4.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/21d1c4.wgsl.expected.glsl | 6 +- .../textureLoad/21d1c4.wgsl.expected.msl | 2 +- .../textureLoad/21d1c4.wgsl.expected.spvasm | 4 +- .../textureLoad/21d1c4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/223246.wgsl | 2 +- .../textureLoad/223246.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/223246.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/223246.wgsl.expected.glsl | 6 +- .../textureLoad/223246.wgsl.expected.msl | 2 +- .../textureLoad/223246.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/223246.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/2363be.wgsl | 2 +- .../textureLoad/2363be.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/2363be.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/2363be.wgsl.expected.glsl | 6 +- .../textureLoad/2363be.wgsl.expected.msl | 2 +- .../textureLoad/2363be.wgsl.expected.spvasm | 43 ++++++----- .../textureLoad/2363be.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/2d479c.wgsl | 2 +- .../textureLoad/2d479c.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/2d479c.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/2d479c.wgsl.expected.glsl | 6 +- .../textureLoad/2d479c.wgsl.expected.msl | 2 +- .../textureLoad/2d479c.wgsl.expected.spvasm | 29 +++---- .../textureLoad/2d479c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/2e09aa.wgsl | 2 +- .../textureLoad/2e09aa.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/2e09aa.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/2e09aa.wgsl.expected.glsl | 6 +- .../textureLoad/2e09aa.wgsl.expected.msl | 2 +- .../textureLoad/2e09aa.wgsl.expected.spvasm | 4 +- .../textureLoad/2e09aa.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/38f8ab.wgsl | 2 +- .../textureLoad/38f8ab.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/38f8ab.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/38f8ab.wgsl.expected.glsl | 6 +- .../textureLoad/38f8ab.wgsl.expected.msl | 2 +- .../textureLoad/38f8ab.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/38f8ab.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/3c96e8.wgsl | 2 +- .../textureLoad/3c96e8.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/3c96e8.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/3c96e8.wgsl.expected.glsl | 6 +- .../textureLoad/3c96e8.wgsl.expected.msl | 2 +- .../textureLoad/3c96e8.wgsl.expected.spvasm | 36 +++++---- .../textureLoad/3c96e8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/3d3fd1.wgsl | 2 +- .../textureLoad/3d3fd1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/3d3fd1.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/3d3fd1.wgsl.expected.glsl | 6 +- .../textureLoad/3d3fd1.wgsl.expected.msl | 2 +- .../textureLoad/3d3fd1.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/3d3fd1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/439e2a.wgsl | 2 +- .../textureLoad/439e2a.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/439e2a.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/439e2a.wgsl.expected.glsl | 6 +- .../textureLoad/439e2a.wgsl.expected.msl | 2 +- .../textureLoad/439e2a.wgsl.expected.spvasm | 29 +++---- .../textureLoad/439e2a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/46a93f.wgsl | 2 +- .../textureLoad/46a93f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/46a93f.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/46a93f.wgsl.expected.glsl | 6 +- .../textureLoad/46a93f.wgsl.expected.msl | 2 +- .../textureLoad/46a93f.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/46a93f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/47e818.wgsl | 2 +- .../textureLoad/47e818.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/47e818.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/47e818.wgsl.expected.glsl | 6 +- .../textureLoad/47e818.wgsl.expected.msl | 2 +- .../textureLoad/47e818.wgsl.expected.spvasm | 4 +- .../textureLoad/47e818.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/484344.wgsl | 2 +- .../textureLoad/484344.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/484344.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/484344.wgsl.expected.glsl | 6 +- .../textureLoad/484344.wgsl.expected.msl | 2 +- .../textureLoad/484344.wgsl.expected.spvasm | 4 +- .../textureLoad/484344.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/49f76f.wgsl | 2 +- .../textureLoad/49f76f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/49f76f.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/49f76f.wgsl.expected.glsl | 6 +- .../textureLoad/49f76f.wgsl.expected.msl | 2 +- .../textureLoad/49f76f.wgsl.expected.spvasm | 4 +- .../textureLoad/49f76f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/4acb64.wgsl | 2 +- .../textureLoad/4acb64.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/4acb64.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/4acb64.wgsl.expected.glsl | 6 +- .../textureLoad/4acb64.wgsl.expected.msl | 2 +- .../textureLoad/4acb64.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/4acb64.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/4db25c.wgsl | 2 +- .../textureLoad/4db25c.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/4db25c.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/4db25c.wgsl.expected.glsl | 6 +- .../textureLoad/4db25c.wgsl.expected.msl | 2 +- .../textureLoad/4db25c.wgsl.expected.spvasm | 4 +- .../textureLoad/4db25c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/4fd803.wgsl | 2 +- .../textureLoad/4fd803.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/4fd803.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/4fd803.wgsl.expected.glsl | 6 +- .../textureLoad/4fd803.wgsl.expected.msl | 2 +- .../textureLoad/4fd803.wgsl.expected.spvasm | 4 +- .../textureLoad/4fd803.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/53e142.wgsl | 2 +- .../textureLoad/53e142.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/53e142.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/53e142.wgsl.expected.glsl | 6 +- .../textureLoad/53e142.wgsl.expected.msl | 2 +- .../textureLoad/53e142.wgsl.expected.spvasm | 40 +++++----- .../textureLoad/53e142.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/54a59b.wgsl | 2 +- .../textureLoad/54a59b.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/54a59b.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/54a59b.wgsl.expected.glsl | 6 +- .../textureLoad/54a59b.wgsl.expected.msl | 2 +- .../textureLoad/54a59b.wgsl.expected.spvasm | 36 +++++---- .../textureLoad/54a59b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/6154d4.wgsl | 2 +- .../textureLoad/6154d4.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6154d4.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/6154d4.wgsl.expected.glsl | 6 +- .../textureLoad/6154d4.wgsl.expected.msl | 2 +- .../textureLoad/6154d4.wgsl.expected.spvasm | 4 +- .../textureLoad/6154d4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/6273b1.wgsl | 2 +- .../textureLoad/6273b1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6273b1.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/6273b1.wgsl.expected.glsl | 6 +- .../textureLoad/6273b1.wgsl.expected.msl | 2 +- .../textureLoad/6273b1.wgsl.expected.spvasm | 4 +- .../textureLoad/6273b1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/639962.wgsl | 2 +- .../textureLoad/639962.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/639962.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/639962.wgsl.expected.glsl | 6 +- .../textureLoad/639962.wgsl.expected.msl | 2 +- .../textureLoad/639962.wgsl.expected.spvasm | 4 +- .../textureLoad/639962.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/656d76.wgsl | 2 +- .../textureLoad/656d76.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/656d76.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/656d76.wgsl.expected.glsl | 6 +- .../textureLoad/656d76.wgsl.expected.msl | 2 +- .../textureLoad/656d76.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/656d76.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/66be47.wgsl | 2 +- .../textureLoad/66be47.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/66be47.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/66be47.wgsl.expected.glsl | 6 +- .../textureLoad/66be47.wgsl.expected.msl | 2 +- .../textureLoad/66be47.wgsl.expected.spvasm | 36 +++++---- .../textureLoad/66be47.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/6925bc.wgsl | 2 +- .../textureLoad/6925bc.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6925bc.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/6925bc.wgsl.expected.glsl | 6 +- .../textureLoad/6925bc.wgsl.expected.msl | 2 +- .../textureLoad/6925bc.wgsl.expected.spvasm | 29 +++---- .../textureLoad/6925bc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/6bf4b7.wgsl | 2 +- .../textureLoad/6bf4b7.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6bf4b7.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/6bf4b7.wgsl.expected.glsl | 6 +- .../textureLoad/6bf4b7.wgsl.expected.msl | 2 +- .../textureLoad/6bf4b7.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/6bf4b7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/714471.wgsl | 2 +- .../textureLoad/714471.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/714471.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/714471.wgsl.expected.glsl | 6 +- .../textureLoad/714471.wgsl.expected.msl | 2 +- .../textureLoad/714471.wgsl.expected.spvasm | 4 +- .../textureLoad/714471.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/789045.wgsl | 2 +- .../textureLoad/789045.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/789045.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/789045.wgsl.expected.glsl | 6 +- .../textureLoad/789045.wgsl.expected.msl | 2 +- .../textureLoad/789045.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/789045.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/79e697.wgsl | 2 +- .../textureLoad/79e697.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/79e697.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/79e697.wgsl.expected.glsl | 6 +- .../textureLoad/79e697.wgsl.expected.msl | 2 +- .../textureLoad/79e697.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/79e697.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/7ab4df.wgsl | 2 +- .../textureLoad/7ab4df.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7ab4df.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/7ab4df.wgsl.expected.glsl | 6 +- .../textureLoad/7ab4df.wgsl.expected.msl | 2 +- .../textureLoad/7ab4df.wgsl.expected.spvasm | 43 ++++++----- .../textureLoad/7ab4df.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/7b63e0.wgsl | 2 +- .../textureLoad/7b63e0.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7b63e0.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/7b63e0.wgsl.expected.glsl | 6 +- .../textureLoad/7b63e0.wgsl.expected.msl | 2 +- .../textureLoad/7b63e0.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/7b63e0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/7bee94.wgsl | 2 +- .../textureLoad/7bee94.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7bee94.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/7bee94.wgsl.expected.glsl | 6 +- .../textureLoad/7bee94.wgsl.expected.msl | 2 +- .../textureLoad/7bee94.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/7bee94.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/7c90e5.wgsl | 2 +- .../textureLoad/7c90e5.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7c90e5.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/7c90e5.wgsl.expected.glsl | 6 +- .../textureLoad/7c90e5.wgsl.expected.msl | 2 +- .../textureLoad/7c90e5.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/7c90e5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/7fd822.wgsl | 2 +- .../textureLoad/7fd822.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7fd822.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/7fd822.wgsl.expected.glsl | 6 +- .../textureLoad/7fd822.wgsl.expected.msl | 2 +- .../textureLoad/7fd822.wgsl.expected.spvasm | 29 +++---- .../textureLoad/7fd822.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/84dee1.wgsl | 2 +- .../textureLoad/84dee1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/84dee1.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/84dee1.wgsl.expected.glsl | 6 +- .../textureLoad/84dee1.wgsl.expected.msl | 2 +- .../textureLoad/84dee1.wgsl.expected.spvasm | 4 +- .../textureLoad/84dee1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/8527b1.wgsl | 2 +- .../textureLoad/8527b1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/8527b1.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/8527b1.wgsl.expected.glsl | 6 +- .../textureLoad/8527b1.wgsl.expected.msl | 2 +- .../textureLoad/8527b1.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/8527b1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/87be85.wgsl | 2 +- .../textureLoad/87be85.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/87be85.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/87be85.wgsl.expected.glsl | 6 +- .../textureLoad/87be85.wgsl.expected.msl | 2 +- .../textureLoad/87be85.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/87be85.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/897cf3.wgsl | 2 +- .../textureLoad/897cf3.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/897cf3.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/897cf3.wgsl.expected.glsl | 6 +- .../textureLoad/897cf3.wgsl.expected.msl | 2 +- .../textureLoad/897cf3.wgsl.expected.spvasm | 4 +- .../textureLoad/897cf3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/8acf41.wgsl | 2 +- .../textureLoad/8acf41.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/8acf41.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/8acf41.wgsl.expected.glsl | 6 +- .../textureLoad/8acf41.wgsl.expected.msl | 2 +- .../textureLoad/8acf41.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/8acf41.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/8ccbe3.wgsl | 2 +- .../textureLoad/8ccbe3.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/8ccbe3.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/8ccbe3.wgsl.expected.glsl | 6 +- .../textureLoad/8ccbe3.wgsl.expected.msl | 2 +- .../textureLoad/8ccbe3.wgsl.expected.spvasm | 29 +++---- .../textureLoad/8ccbe3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/92eb1f.wgsl | 2 +- .../textureLoad/92eb1f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/92eb1f.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/92eb1f.wgsl.expected.glsl | 6 +- .../textureLoad/92eb1f.wgsl.expected.msl | 2 +- .../textureLoad/92eb1f.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/92eb1f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/96efd5.wgsl | 2 +- .../textureLoad/96efd5.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/96efd5.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/96efd5.wgsl.expected.glsl | 6 +- .../textureLoad/96efd5.wgsl.expected.msl | 2 +- .../textureLoad/96efd5.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/96efd5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/9885b0.wgsl | 2 +- .../textureLoad/9885b0.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9885b0.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/9885b0.wgsl.expected.glsl | 6 +- .../textureLoad/9885b0.wgsl.expected.msl | 2 +- .../textureLoad/9885b0.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/9885b0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/9aa733.wgsl | 2 +- .../textureLoad/9aa733.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9aa733.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/9aa733.wgsl.expected.glsl | 6 +- .../textureLoad/9aa733.wgsl.expected.msl | 2 +- .../textureLoad/9aa733.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/9aa733.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/9b2667.wgsl | 2 +- .../textureLoad/9b2667.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9b2667.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/9b2667.wgsl.expected.glsl | 6 +- .../textureLoad/9b2667.wgsl.expected.msl | 2 +- .../textureLoad/9b2667.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/9b2667.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/9d70e9.wgsl | 2 +- .../textureLoad/9d70e9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9d70e9.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/9d70e9.wgsl.expected.glsl | 6 +- .../textureLoad/9d70e9.wgsl.expected.msl | 2 +- .../textureLoad/9d70e9.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/9d70e9.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/9ed19e.wgsl | 2 +- .../textureLoad/9ed19e.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9ed19e.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/9ed19e.wgsl.expected.glsl | 6 +- .../textureLoad/9ed19e.wgsl.expected.msl | 2 +- .../textureLoad/9ed19e.wgsl.expected.spvasm | 4 +- .../textureLoad/9ed19e.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/9fbfd9.wgsl | 2 +- .../textureLoad/9fbfd9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9fbfd9.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/9fbfd9.wgsl.expected.glsl | 6 +- .../textureLoad/9fbfd9.wgsl.expected.msl | 2 +- .../textureLoad/9fbfd9.wgsl.expected.spvasm | 40 +++++----- .../textureLoad/9fbfd9.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/a24be1.wgsl | 2 +- .../textureLoad/a24be1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/a24be1.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/a24be1.wgsl.expected.glsl | 6 +- .../textureLoad/a24be1.wgsl.expected.msl | 2 +- .../textureLoad/a24be1.wgsl.expected.spvasm | 43 ++++++----- .../textureLoad/a24be1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/a583c9.wgsl | 2 +- .../textureLoad/a583c9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/a583c9.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/a583c9.wgsl.expected.glsl | 6 +- .../textureLoad/a583c9.wgsl.expected.msl | 2 +- .../textureLoad/a583c9.wgsl.expected.spvasm | 4 +- .../textureLoad/a583c9.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/a9a9f5.wgsl | 2 +- .../textureLoad/a9a9f5.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/a9a9f5.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/a9a9f5.wgsl.expected.glsl | 6 +- .../textureLoad/a9a9f5.wgsl.expected.msl | 2 +- .../textureLoad/a9a9f5.wgsl.expected.spvasm | 4 +- .../textureLoad/a9a9f5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/b29f71.wgsl | 2 +- .../textureLoad/b29f71.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b29f71.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/b29f71.wgsl.expected.glsl | 6 +- .../textureLoad/b29f71.wgsl.expected.msl | 2 +- .../textureLoad/b29f71.wgsl.expected.spvasm | 43 ++++++----- .../textureLoad/b29f71.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/b6ba5d.wgsl | 2 +- .../textureLoad/b6ba5d.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b6ba5d.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/b6ba5d.wgsl.expected.glsl | 6 +- .../textureLoad/b6ba5d.wgsl.expected.msl | 2 +- .../textureLoad/b6ba5d.wgsl.expected.spvasm | 36 +++++---- .../textureLoad/b6ba5d.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/b73f6b.wgsl | 2 +- .../textureLoad/b73f6b.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b73f6b.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/b73f6b.wgsl.expected.glsl | 6 +- .../textureLoad/b73f6b.wgsl.expected.msl | 2 +- .../textureLoad/b73f6b.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/b73f6b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/b75d4a.wgsl | 2 +- .../textureLoad/b75d4a.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b75d4a.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/b75d4a.wgsl.expected.glsl | 6 +- .../textureLoad/b75d4a.wgsl.expected.msl | 2 +- .../textureLoad/b75d4a.wgsl.expected.spvasm | 29 +++---- .../textureLoad/b75d4a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/bcbb3c.wgsl | 2 +- .../textureLoad/bcbb3c.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/bcbb3c.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/bcbb3c.wgsl.expected.glsl | 6 +- .../textureLoad/bcbb3c.wgsl.expected.msl | 2 +- .../textureLoad/bcbb3c.wgsl.expected.spvasm | 29 +++---- .../textureLoad/bcbb3c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/c16e00.wgsl | 2 +- .../textureLoad/c16e00.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/c16e00.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/c16e00.wgsl.expected.glsl | 6 +- .../textureLoad/c16e00.wgsl.expected.msl | 2 +- .../textureLoad/c16e00.wgsl.expected.spvasm | 39 +++++----- .../textureLoad/c16e00.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/c2a480.wgsl | 2 +- .../textureLoad/c2a480.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/c2a480.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/c2a480.wgsl.expected.glsl | 6 +- .../textureLoad/c2a480.wgsl.expected.msl | 2 +- .../textureLoad/c2a480.wgsl.expected.spvasm | 4 +- .../textureLoad/c2a480.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/c378ee.wgsl | 2 +- .../textureLoad/c378ee.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/c378ee.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/c378ee.wgsl.expected.glsl | 6 +- .../textureLoad/c378ee.wgsl.expected.msl | 2 +- .../textureLoad/c378ee.wgsl.expected.spvasm | 4 +- .../textureLoad/c378ee.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/cad5f2.wgsl | 2 +- .../textureLoad/cad5f2.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/cad5f2.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/cad5f2.wgsl.expected.glsl | 6 +- .../textureLoad/cad5f2.wgsl.expected.msl | 2 +- .../textureLoad/cad5f2.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/cad5f2.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/cb57c2.wgsl | 2 +- .../textureLoad/cb57c2.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/cb57c2.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/cb57c2.wgsl.expected.glsl | 6 +- .../textureLoad/cb57c2.wgsl.expected.msl | 2 +- .../textureLoad/cb57c2.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/cb57c2.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/e35f72.wgsl | 2 +- .../textureLoad/e35f72.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/e35f72.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/e35f72.wgsl.expected.glsl | 6 +- .../textureLoad/e35f72.wgsl.expected.msl | 2 +- .../textureLoad/e35f72.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/e35f72.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/e3d2cc.wgsl | 2 +- .../textureLoad/e3d2cc.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/e3d2cc.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/e3d2cc.wgsl.expected.glsl | 6 +- .../textureLoad/e3d2cc.wgsl.expected.msl | 2 +- .../textureLoad/e3d2cc.wgsl.expected.spvasm | 4 +- .../textureLoad/e3d2cc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/ebfb92.wgsl | 2 +- .../textureLoad/ebfb92.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/ebfb92.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/ebfb92.wgsl.expected.glsl | 6 +- .../textureLoad/ebfb92.wgsl.expected.msl | 2 +- .../textureLoad/ebfb92.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/ebfb92.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/f0abad.wgsl | 2 +- .../textureLoad/f0abad.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/f0abad.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/f0abad.wgsl.expected.glsl | 6 +- .../textureLoad/f0abad.wgsl.expected.msl | 2 +- .../textureLoad/f0abad.wgsl.expected.spvasm | 29 +++---- .../textureLoad/f0abad.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/f348d9.wgsl | 2 +- .../textureLoad/f348d9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/f348d9.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/f348d9.wgsl.expected.glsl | 6 +- .../textureLoad/f348d9.wgsl.expected.msl | 2 +- .../textureLoad/f348d9.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/f348d9.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/f85291.wgsl | 2 +- .../textureLoad/f85291.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/f85291.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/f85291.wgsl.expected.glsl | 6 +- .../textureLoad/f85291.wgsl.expected.msl | 2 +- .../textureLoad/f85291.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/f85291.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/fcd23d.wgsl | 2 +- .../textureLoad/fcd23d.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/fcd23d.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/fcd23d.wgsl.expected.glsl | 6 +- .../textureLoad/fcd23d.wgsl.expected.msl | 2 +- .../textureLoad/fcd23d.wgsl.expected.spvasm | 29 +++---- .../textureLoad/fcd23d.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/fe0565.wgsl | 2 +- .../textureLoad/fe0565.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/fe0565.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/fe0565.wgsl.expected.glsl | 6 +- .../textureLoad/fe0565.wgsl.expected.msl | 2 +- .../textureLoad/fe0565.wgsl.expected.spvasm | 33 ++++---- .../textureLoad/fe0565.wgsl.expected.wgsl | 2 +- .../gen/literal/textureLoad/ff1119.wgsl | 2 +- .../textureLoad/ff1119.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/ff1119.wgsl.expected.fxc.hlsl | 2 +- .../textureLoad/ff1119.wgsl.expected.glsl | 6 +- .../textureLoad/ff1119.wgsl.expected.msl | 2 +- .../textureLoad/ff1119.wgsl.expected.spvasm | 35 +++++---- .../textureLoad/ff1119.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/0dff6c.wgsl | 2 +- .../0dff6c.wgsl.expected.dxc.hlsl | 2 +- .../0dff6c.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/0dff6c.wgsl.expected.glsl | 2 +- .../textureSample/0dff6c.wgsl.expected.msl | 2 +- .../textureSample/0dff6c.wgsl.expected.spvasm | 18 +++-- .../textureSample/0dff6c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/17e988.wgsl | 2 +- .../17e988.wgsl.expected.dxc.hlsl | 2 +- .../17e988.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/17e988.wgsl.expected.glsl | 2 +- .../textureSample/17e988.wgsl.expected.msl | 2 +- .../textureSample/17e988.wgsl.expected.spvasm | 24 +++--- .../textureSample/17e988.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/193203.wgsl | 2 +- .../193203.wgsl.expected.dxc.hlsl | 2 +- .../193203.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/193203.wgsl.expected.glsl | 2 +- .../textureSample/193203.wgsl.expected.msl | 2 +- .../textureSample/193203.wgsl.expected.spvasm | 25 +++--- .../textureSample/193203.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/1a4e1b.wgsl | 2 +- .../1a4e1b.wgsl.expected.dxc.hlsl | 2 +- .../1a4e1b.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/1a4e1b.wgsl.expected.glsl | 2 +- .../textureSample/1a4e1b.wgsl.expected.msl | 2 +- .../textureSample/1a4e1b.wgsl.expected.spvasm | 22 +++--- .../textureSample/1a4e1b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/2149ec.wgsl | 2 +- .../2149ec.wgsl.expected.dxc.hlsl | 2 +- .../2149ec.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/2149ec.wgsl.expected.glsl | 2 +- .../textureSample/2149ec.wgsl.expected.msl | 2 +- .../textureSample/2149ec.wgsl.expected.spvasm | 18 +++-- .../textureSample/2149ec.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/38bbb9.wgsl | 2 +- .../38bbb9.wgsl.expected.dxc.hlsl | 2 +- .../38bbb9.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/38bbb9.wgsl.expected.glsl | 2 +- .../textureSample/38bbb9.wgsl.expected.msl | 2 +- .../textureSample/38bbb9.wgsl.expected.spvasm | 15 ++-- .../textureSample/38bbb9.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/3b50bd.wgsl | 2 +- .../3b50bd.wgsl.expected.dxc.hlsl | 2 +- .../3b50bd.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/3b50bd.wgsl.expected.glsl | 2 +- .../textureSample/3b50bd.wgsl.expected.msl | 2 +- .../textureSample/3b50bd.wgsl.expected.spvasm | 15 ++-- .../textureSample/3b50bd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/4703d0.wgsl | 2 +- .../4703d0.wgsl.expected.dxc.hlsl | 2 +- .../4703d0.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/4703d0.wgsl.expected.msl | 2 +- .../textureSample/4703d0.wgsl.expected.spvasm | 25 +++--- .../textureSample/4703d0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/4dd1bf.wgsl | 2 +- .../4dd1bf.wgsl.expected.dxc.hlsl | 2 +- .../4dd1bf.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/4dd1bf.wgsl.expected.msl | 2 +- .../textureSample/4dd1bf.wgsl.expected.spvasm | 23 +++--- .../textureSample/4dd1bf.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/51b514.wgsl | 2 +- .../51b514.wgsl.expected.dxc.hlsl | 2 +- .../51b514.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/51b514.wgsl.expected.glsl | 2 +- .../textureSample/51b514.wgsl.expected.msl | 2 +- .../textureSample/51b514.wgsl.expected.spvasm | 15 ++-- .../textureSample/51b514.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/60bf45.wgsl | 2 +- .../60bf45.wgsl.expected.dxc.hlsl | 2 +- .../60bf45.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/60bf45.wgsl.expected.msl | 2 +- .../textureSample/60bf45.wgsl.expected.spvasm | 24 +++--- .../textureSample/60bf45.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/6717ca.wgsl | 2 +- .../6717ca.wgsl.expected.dxc.hlsl | 2 +- .../6717ca.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/6717ca.wgsl.expected.glsl | 2 +- .../textureSample/6717ca.wgsl.expected.msl | 2 +- .../textureSample/6717ca.wgsl.expected.spvasm | 22 +++--- .../textureSample/6717ca.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/7e9ffd.wgsl | 2 +- .../7e9ffd.wgsl.expected.dxc.hlsl | 2 +- .../7e9ffd.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/7e9ffd.wgsl.expected.glsl | 2 +- .../textureSample/7e9ffd.wgsl.expected.msl | 2 +- .../textureSample/7e9ffd.wgsl.expected.spvasm | 22 +++--- .../textureSample/7e9ffd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/7fd8cb.wgsl | 2 +- .../7fd8cb.wgsl.expected.dxc.hlsl | 2 +- .../7fd8cb.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/7fd8cb.wgsl.expected.msl | 2 +- .../textureSample/7fd8cb.wgsl.expected.spvasm | 23 +++--- .../textureSample/7fd8cb.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/85c4ba.wgsl | 2 +- .../85c4ba.wgsl.expected.dxc.hlsl | 2 +- .../85c4ba.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/85c4ba.wgsl.expected.glsl | 2 +- .../textureSample/85c4ba.wgsl.expected.msl | 2 +- .../textureSample/85c4ba.wgsl.expected.spvasm | 18 +++-- .../textureSample/85c4ba.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/bc7477.wgsl | 2 +- .../bc7477.wgsl.expected.dxc.hlsl | 2 +- .../bc7477.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/bc7477.wgsl.expected.msl | 2 +- .../textureSample/bc7477.wgsl.expected.spvasm | 23 +++--- .../textureSample/bc7477.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/c2f4e8.wgsl | 2 +- .../c2f4e8.wgsl.expected.dxc.hlsl | 2 +- .../c2f4e8.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/c2f4e8.wgsl.expected.msl | 2 +- .../textureSample/c2f4e8.wgsl.expected.spvasm | 23 +++--- .../textureSample/c2f4e8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/d6b281.wgsl | 2 +- .../d6b281.wgsl.expected.dxc.hlsl | 2 +- .../d6b281.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/d6b281.wgsl.expected.glsl | 2 +- .../textureSample/d6b281.wgsl.expected.msl | 2 +- .../textureSample/d6b281.wgsl.expected.spvasm | 22 +++--- .../textureSample/d6b281.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/e53267.wgsl | 2 +- .../e53267.wgsl.expected.dxc.hlsl | 2 +- .../e53267.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/e53267.wgsl.expected.glsl | 2 +- .../textureSample/e53267.wgsl.expected.msl | 2 +- .../textureSample/e53267.wgsl.expected.spvasm | 15 ++-- .../textureSample/e53267.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSample/ea7030.wgsl | 2 +- .../ea7030.wgsl.expected.dxc.hlsl | 2 +- .../ea7030.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/ea7030.wgsl.expected.glsl | 2 +- .../textureSample/ea7030.wgsl.expected.msl | 2 +- .../textureSample/ea7030.wgsl.expected.spvasm | 15 ++-- .../textureSample/ea7030.wgsl.expected.wgsl | 2 +- .../textureSampleBaseClampToEdge/7c04e6.wgsl | 2 +- .../7c04e6.wgsl.expected.dxc.hlsl | 2 +- .../7c04e6.wgsl.expected.fxc.hlsl | 2 +- .../7c04e6.wgsl.expected.glsl | 6 +- .../7c04e6.wgsl.expected.msl | 2 +- .../7c04e6.wgsl.expected.spvasm | 31 ++++---- .../7c04e6.wgsl.expected.wgsl | 2 +- .../textureSampleBaseClampToEdge/9ca02c.wgsl | 2 +- .../9ca02c.wgsl.expected.dxc.hlsl | 2 +- .../9ca02c.wgsl.expected.fxc.hlsl | 2 +- .../9ca02c.wgsl.expected.glsl | 6 +- .../9ca02c.wgsl.expected.msl | 2 +- .../9ca02c.wgsl.expected.spvasm | 27 +++---- .../9ca02c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/1c707e.wgsl | 2 +- .../1c707e.wgsl.expected.dxc.hlsl | 2 +- .../1c707e.wgsl.expected.fxc.hlsl | 2 +- .../1c707e.wgsl.expected.glsl | 2 +- .../1c707e.wgsl.expected.msl | 2 +- .../1c707e.wgsl.expected.spvasm | 23 +++--- .../1c707e.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/53b9f7.wgsl | 2 +- .../53b9f7.wgsl.expected.dxc.hlsl | 2 +- .../53b9f7.wgsl.expected.fxc.hlsl | 2 +- .../53b9f7.wgsl.expected.glsl | 2 +- .../53b9f7.wgsl.expected.msl | 2 +- .../53b9f7.wgsl.expected.spvasm | 4 +- .../53b9f7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/594824.wgsl | 2 +- .../594824.wgsl.expected.dxc.hlsl | 2 +- .../594824.wgsl.expected.fxc.hlsl | 2 +- .../594824.wgsl.expected.glsl | 2 +- .../594824.wgsl.expected.msl | 2 +- .../594824.wgsl.expected.spvasm | 17 +++-- .../594824.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/6a9113.wgsl | 2 +- .../6a9113.wgsl.expected.dxc.hlsl | 2 +- .../6a9113.wgsl.expected.fxc.hlsl | 2 +- .../6a9113.wgsl.expected.glsl | 2 +- .../6a9113.wgsl.expected.msl | 2 +- .../6a9113.wgsl.expected.spvasm | 4 +- .../6a9113.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/80e579.wgsl | 2 +- .../80e579.wgsl.expected.dxc.hlsl | 2 +- .../80e579.wgsl.expected.fxc.hlsl | 2 +- .../80e579.wgsl.expected.glsl | 2 +- .../80e579.wgsl.expected.msl | 2 +- .../80e579.wgsl.expected.spvasm | 23 +++--- .../80e579.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/87915c.wgsl | 2 +- .../87915c.wgsl.expected.dxc.hlsl | 2 +- .../87915c.wgsl.expected.fxc.hlsl | 2 +- .../87915c.wgsl.expected.glsl | 2 +- .../87915c.wgsl.expected.msl | 2 +- .../87915c.wgsl.expected.spvasm | 26 ++++--- .../87915c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/9dbb51.wgsl | 2 +- .../9dbb51.wgsl.expected.dxc.hlsl | 2 +- .../9dbb51.wgsl.expected.fxc.hlsl | 2 +- .../9dbb51.wgsl.expected.glsl | 2 +- .../9dbb51.wgsl.expected.msl | 2 +- .../9dbb51.wgsl.expected.spvasm | 25 +++--- .../9dbb51.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/a161cf.wgsl | 2 +- .../a161cf.wgsl.expected.dxc.hlsl | 2 +- .../a161cf.wgsl.expected.fxc.hlsl | 2 +- .../a161cf.wgsl.expected.glsl | 2 +- .../a161cf.wgsl.expected.msl | 2 +- .../a161cf.wgsl.expected.spvasm | 17 +++-- .../a161cf.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/c6953d.wgsl | 2 +- .../c6953d.wgsl.expected.dxc.hlsl | 2 +- .../c6953d.wgsl.expected.fxc.hlsl | 2 +- .../c6953d.wgsl.expected.msl | 2 +- .../c6953d.wgsl.expected.spvasm | 24 +++--- .../c6953d.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/d3fa1b.wgsl | 2 +- .../d3fa1b.wgsl.expected.dxc.hlsl | 2 +- .../d3fa1b.wgsl.expected.fxc.hlsl | 2 +- .../d3fa1b.wgsl.expected.glsl | 2 +- .../d3fa1b.wgsl.expected.msl | 2 +- .../d3fa1b.wgsl.expected.spvasm | 4 +- .../d3fa1b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleBias/eed7c4.wgsl | 2 +- .../eed7c4.wgsl.expected.dxc.hlsl | 2 +- .../eed7c4.wgsl.expected.fxc.hlsl | 2 +- .../eed7c4.wgsl.expected.msl | 2 +- .../eed7c4.wgsl.expected.spvasm | 24 +++--- .../eed7c4.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/1912e5.wgsl | 2 +- .../1912e5.wgsl.expected.dxc.hlsl | 2 +- .../1912e5.wgsl.expected.fxc.hlsl | 2 +- .../1912e5.wgsl.expected.msl | 2 +- .../1912e5.wgsl.expected.spvasm | 24 +++--- .../1912e5.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/3a5923.wgsl | 2 +- .../3a5923.wgsl.expected.dxc.hlsl | 2 +- .../3a5923.wgsl.expected.fxc.hlsl | 2 +- .../3a5923.wgsl.expected.glsl | 2 +- .../3a5923.wgsl.expected.msl | 2 +- .../3a5923.wgsl.expected.spvasm | 4 +- .../3a5923.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/63fb83.wgsl | 2 +- .../63fb83.wgsl.expected.dxc.hlsl | 2 +- .../63fb83.wgsl.expected.fxc.hlsl | 2 +- .../63fb83.wgsl.expected.glsl | 2 +- .../63fb83.wgsl.expected.msl | 2 +- .../63fb83.wgsl.expected.spvasm | 4 +- .../63fb83.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/7b5025.wgsl | 2 +- .../7b5025.wgsl.expected.dxc.hlsl | 2 +- .../7b5025.wgsl.expected.fxc.hlsl | 2 +- .../7b5025.wgsl.expected.msl | 2 +- .../7b5025.wgsl.expected.spvasm | 26 ++++--- .../7b5025.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/90ae56.wgsl | 2 +- .../90ae56.wgsl.expected.dxc.hlsl | 2 +- .../90ae56.wgsl.expected.fxc.hlsl | 2 +- .../90ae56.wgsl.expected.glsl | 2 +- .../90ae56.wgsl.expected.msl | 2 +- .../90ae56.wgsl.expected.spvasm | 23 +++--- .../90ae56.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/a3ca7e.wgsl | 2 +- .../a3ca7e.wgsl.expected.dxc.hlsl | 2 +- .../a3ca7e.wgsl.expected.fxc.hlsl | 2 +- .../a3ca7e.wgsl.expected.msl | 2 +- .../a3ca7e.wgsl.expected.spvasm | 24 +++--- .../a3ca7e.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/af1051.wgsl | 2 +- .../af1051.wgsl.expected.dxc.hlsl | 2 +- .../af1051.wgsl.expected.fxc.hlsl | 2 +- .../af1051.wgsl.expected.msl | 2 +- .../af1051.wgsl.expected.spvasm | 25 +++--- .../af1051.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/dd431d.wgsl | 2 +- .../dd431d.wgsl.expected.dxc.hlsl | 2 +- .../dd431d.wgsl.expected.fxc.hlsl | 2 +- .../dd431d.wgsl.expected.glsl | 2 +- .../dd431d.wgsl.expected.msl | 2 +- .../dd431d.wgsl.expected.spvasm | 23 +++--- .../dd431d.wgsl.expected.wgsl | 2 +- .../literal/textureSampleCompare/dec064.wgsl | 2 +- .../dec064.wgsl.expected.dxc.hlsl | 2 +- .../dec064.wgsl.expected.fxc.hlsl | 2 +- .../dec064.wgsl.expected.glsl | 2 +- .../dec064.wgsl.expected.msl | 2 +- .../dec064.wgsl.expected.spvasm | 17 +++-- .../dec064.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/1116ed.wgsl | 2 +- .../1116ed.wgsl.expected.dxc.hlsl | 2 +- .../1116ed.wgsl.expected.fxc.hlsl | 2 +- .../1116ed.wgsl.expected.glsl | 6 +- .../1116ed.wgsl.expected.msl | 2 +- .../1116ed.wgsl.expected.spvasm | 38 +++++----- .../1116ed.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/1568e3.wgsl | 2 +- .../1568e3.wgsl.expected.dxc.hlsl | 2 +- .../1568e3.wgsl.expected.fxc.hlsl | 2 +- .../1568e3.wgsl.expected.glsl | 6 +- .../1568e3.wgsl.expected.msl | 2 +- .../1568e3.wgsl.expected.spvasm | 4 +- .../1568e3.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/2ad2b1.wgsl | 2 +- .../2ad2b1.wgsl.expected.dxc.hlsl | 2 +- .../2ad2b1.wgsl.expected.fxc.hlsl | 2 +- .../2ad2b1.wgsl.expected.glsl | 6 +- .../2ad2b1.wgsl.expected.msl | 2 +- .../2ad2b1.wgsl.expected.spvasm | 4 +- .../2ad2b1.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/4cf3a2.wgsl | 2 +- .../4cf3a2.wgsl.expected.dxc.hlsl | 2 +- .../4cf3a2.wgsl.expected.fxc.hlsl | 2 +- .../4cf3a2.wgsl.expected.msl | 2 +- .../4cf3a2.wgsl.expected.spvasm | 39 +++++----- .../4cf3a2.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/7dc3c0.wgsl | 2 +- .../7dc3c0.wgsl.expected.dxc.hlsl | 2 +- .../7dc3c0.wgsl.expected.fxc.hlsl | 2 +- .../7dc3c0.wgsl.expected.glsl | 6 +- .../7dc3c0.wgsl.expected.msl | 2 +- .../7dc3c0.wgsl.expected.spvasm | 38 +++++----- .../7dc3c0.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/7f2b9a.wgsl | 2 +- .../7f2b9a.wgsl.expected.dxc.hlsl | 2 +- .../7f2b9a.wgsl.expected.fxc.hlsl | 2 +- .../7f2b9a.wgsl.expected.glsl | 6 +- .../7f2b9a.wgsl.expected.msl | 2 +- .../7f2b9a.wgsl.expected.spvasm | 31 ++++---- .../7f2b9a.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/958c87.wgsl | 2 +- .../958c87.wgsl.expected.dxc.hlsl | 2 +- .../958c87.wgsl.expected.fxc.hlsl | 2 +- .../958c87.wgsl.expected.msl | 2 +- .../958c87.wgsl.expected.spvasm | 39 +++++----- .../958c87.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/b6e47c.wgsl | 2 +- .../b6e47c.wgsl.expected.dxc.hlsl | 2 +- .../b6e47c.wgsl.expected.fxc.hlsl | 2 +- .../b6e47c.wgsl.expected.msl | 2 +- .../b6e47c.wgsl.expected.spvasm | 40 +++++----- .../b6e47c.wgsl.expected.wgsl | 2 +- .../textureSampleCompareLevel/bcb3dd.wgsl | 2 +- .../bcb3dd.wgsl.expected.dxc.hlsl | 2 +- .../bcb3dd.wgsl.expected.fxc.hlsl | 2 +- .../bcb3dd.wgsl.expected.msl | 2 +- .../bcb3dd.wgsl.expected.spvasm | 41 +++++----- .../bcb3dd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/21402b.wgsl | 2 +- .../21402b.wgsl.expected.dxc.hlsl | 2 +- .../21402b.wgsl.expected.fxc.hlsl | 2 +- .../21402b.wgsl.expected.glsl | 6 +- .../21402b.wgsl.expected.msl | 2 +- .../21402b.wgsl.expected.spvasm | 20 ++--- .../21402b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/2ecd8f.wgsl | 2 +- .../2ecd8f.wgsl.expected.dxc.hlsl | 2 +- .../2ecd8f.wgsl.expected.fxc.hlsl | 2 +- .../2ecd8f.wgsl.expected.glsl | 6 +- .../2ecd8f.wgsl.expected.msl | 2 +- .../2ecd8f.wgsl.expected.spvasm | 39 +++++----- .../2ecd8f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/521263.wgsl | 2 +- .../521263.wgsl.expected.dxc.hlsl | 2 +- .../521263.wgsl.expected.fxc.hlsl | 2 +- .../521263.wgsl.expected.glsl | 6 +- .../521263.wgsl.expected.msl | 2 +- .../521263.wgsl.expected.spvasm | 20 ++--- .../521263.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/5312f4.wgsl | 2 +- .../5312f4.wgsl.expected.dxc.hlsl | 2 +- .../5312f4.wgsl.expected.fxc.hlsl | 2 +- .../5312f4.wgsl.expected.glsl | 6 +- .../5312f4.wgsl.expected.msl | 2 +- .../5312f4.wgsl.expected.spvasm | 20 ++--- .../5312f4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/5884dd.wgsl | 2 +- .../5884dd.wgsl.expected.dxc.hlsl | 2 +- .../5884dd.wgsl.expected.fxc.hlsl | 2 +- .../5884dd.wgsl.expected.glsl | 6 +- .../5884dd.wgsl.expected.msl | 2 +- .../5884dd.wgsl.expected.spvasm | 33 ++++---- .../5884dd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/7cd6de.wgsl | 2 +- .../7cd6de.wgsl.expected.dxc.hlsl | 2 +- .../7cd6de.wgsl.expected.fxc.hlsl | 2 +- .../7cd6de.wgsl.expected.glsl | 6 +- .../7cd6de.wgsl.expected.msl | 2 +- .../7cd6de.wgsl.expected.spvasm | 42 +++++----- .../7cd6de.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/a09131.wgsl | 2 +- .../a09131.wgsl.expected.dxc.hlsl | 2 +- .../a09131.wgsl.expected.fxc.hlsl | 2 +- .../a09131.wgsl.expected.glsl | 6 +- .../a09131.wgsl.expected.msl | 2 +- .../a09131.wgsl.expected.spvasm | 39 +++++----- .../a09131.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/bbb58f.wgsl | 2 +- .../bbb58f.wgsl.expected.dxc.hlsl | 2 +- .../bbb58f.wgsl.expected.fxc.hlsl | 2 +- .../bbb58f.wgsl.expected.msl | 2 +- .../bbb58f.wgsl.expected.spvasm | 40 +++++----- .../bbb58f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/d4e3c5.wgsl | 2 +- .../d4e3c5.wgsl.expected.dxc.hlsl | 2 +- .../d4e3c5.wgsl.expected.fxc.hlsl | 2 +- .../d4e3c5.wgsl.expected.glsl | 6 +- .../d4e3c5.wgsl.expected.msl | 2 +- .../d4e3c5.wgsl.expected.spvasm | 33 ++++---- .../d4e3c5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/d65515.wgsl | 2 +- .../d65515.wgsl.expected.dxc.hlsl | 2 +- .../d65515.wgsl.expected.fxc.hlsl | 2 +- .../d65515.wgsl.expected.glsl | 6 +- .../d65515.wgsl.expected.msl | 2 +- .../d65515.wgsl.expected.spvasm | 41 +++++----- .../d65515.wgsl.expected.wgsl | 2 +- .../gen/literal/textureSampleGrad/e383db.wgsl | 2 +- .../e383db.wgsl.expected.dxc.hlsl | 2 +- .../e383db.wgsl.expected.fxc.hlsl | 2 +- .../e383db.wgsl.expected.msl | 2 +- .../e383db.wgsl.expected.spvasm | 40 +++++----- .../e383db.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/02be59.wgsl | 2 +- .../02be59.wgsl.expected.dxc.hlsl | 2 +- .../02be59.wgsl.expected.fxc.hlsl | 2 +- .../02be59.wgsl.expected.glsl | 6 +- .../02be59.wgsl.expected.msl | 2 +- .../02be59.wgsl.expected.spvasm | 22 +++--- .../02be59.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/0b0a1b.wgsl | 2 +- .../0b0a1b.wgsl.expected.dxc.hlsl | 2 +- .../0b0a1b.wgsl.expected.fxc.hlsl | 2 +- .../0b0a1b.wgsl.expected.glsl | 6 +- .../0b0a1b.wgsl.expected.msl | 2 +- .../0b0a1b.wgsl.expected.spvasm | 31 ++++---- .../0b0a1b.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/0bdd9a.wgsl | 2 +- .../0bdd9a.wgsl.expected.dxc.hlsl | 2 +- .../0bdd9a.wgsl.expected.fxc.hlsl | 2 +- .../0bdd9a.wgsl.expected.msl | 2 +- .../0bdd9a.wgsl.expected.spvasm | 38 +++++----- .../0bdd9a.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/1b0291.wgsl | 2 +- .../1b0291.wgsl.expected.dxc.hlsl | 2 +- .../1b0291.wgsl.expected.fxc.hlsl | 2 +- .../1b0291.wgsl.expected.msl | 2 +- .../1b0291.wgsl.expected.spvasm | 22 +++--- .../1b0291.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/1bf73e.wgsl | 2 +- .../1bf73e.wgsl.expected.dxc.hlsl | 2 +- .../1bf73e.wgsl.expected.fxc.hlsl | 2 +- .../1bf73e.wgsl.expected.msl | 2 +- .../1bf73e.wgsl.expected.spvasm | 39 +++++----- .../1bf73e.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/265cc7.wgsl | 2 +- .../265cc7.wgsl.expected.dxc.hlsl | 2 +- .../265cc7.wgsl.expected.fxc.hlsl | 2 +- .../265cc7.wgsl.expected.glsl | 6 +- .../265cc7.wgsl.expected.msl | 2 +- .../265cc7.wgsl.expected.spvasm | 39 +++++----- .../265cc7.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/2974eb.wgsl | 2 +- .../2974eb.wgsl.expected.dxc.hlsl | 2 +- .../2974eb.wgsl.expected.fxc.hlsl | 2 +- .../2974eb.wgsl.expected.msl | 2 +- .../2974eb.wgsl.expected.spvasm | 41 +++++----- .../2974eb.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/302be4.wgsl | 2 +- .../302be4.wgsl.expected.dxc.hlsl | 2 +- .../302be4.wgsl.expected.fxc.hlsl | 2 +- .../302be4.wgsl.expected.glsl | 6 +- .../302be4.wgsl.expected.msl | 2 +- .../302be4.wgsl.expected.spvasm | 39 +++++----- .../302be4.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/36780e.wgsl | 2 +- .../36780e.wgsl.expected.dxc.hlsl | 2 +- .../36780e.wgsl.expected.fxc.hlsl | 2 +- .../36780e.wgsl.expected.msl | 2 +- .../36780e.wgsl.expected.spvasm | 41 +++++----- .../36780e.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/36f0d3.wgsl | 2 +- .../36f0d3.wgsl.expected.dxc.hlsl | 2 +- .../36f0d3.wgsl.expected.fxc.hlsl | 2 +- .../36f0d3.wgsl.expected.msl | 2 +- .../36f0d3.wgsl.expected.spvasm | 43 ++++++----- .../36f0d3.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/3c3442.wgsl | 2 +- .../3c3442.wgsl.expected.dxc.hlsl | 2 +- .../3c3442.wgsl.expected.fxc.hlsl | 2 +- .../3c3442.wgsl.expected.msl | 2 +- .../3c3442.wgsl.expected.spvasm | 41 +++++----- .../3c3442.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/615583.wgsl | 2 +- .../615583.wgsl.expected.dxc.hlsl | 2 +- .../615583.wgsl.expected.fxc.hlsl | 2 +- .../615583.wgsl.expected.msl | 2 +- .../615583.wgsl.expected.spvasm | 41 +++++----- .../615583.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/73e892.wgsl | 2 +- .../73e892.wgsl.expected.dxc.hlsl | 2 +- .../73e892.wgsl.expected.fxc.hlsl | 2 +- .../73e892.wgsl.expected.glsl | 6 +- .../73e892.wgsl.expected.msl | 2 +- .../73e892.wgsl.expected.spvasm | 22 +++--- .../73e892.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/749baf.wgsl | 2 +- .../749baf.wgsl.expected.dxc.hlsl | 2 +- .../749baf.wgsl.expected.fxc.hlsl | 2 +- .../749baf.wgsl.expected.glsl | 6 +- .../749baf.wgsl.expected.msl | 2 +- .../749baf.wgsl.expected.spvasm | 24 +++--- .../749baf.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/941a53.wgsl | 2 +- .../941a53.wgsl.expected.dxc.hlsl | 2 +- .../941a53.wgsl.expected.fxc.hlsl | 2 +- .../941a53.wgsl.expected.msl | 2 +- .../941a53.wgsl.expected.spvasm | 40 +++++----- .../941a53.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/979816.wgsl | 2 +- .../979816.wgsl.expected.dxc.hlsl | 4 +- .../979816.wgsl.expected.fxc.hlsl | 4 +- .../979816.wgsl.expected.glsl | 8 +- .../979816.wgsl.expected.msl | 4 +- .../979816.wgsl.expected.spvasm | 4 +- .../979816.wgsl.expected.wgsl | 4 +- .../literal/textureSampleLevel/a12142.wgsl | 2 +- .../a12142.wgsl.expected.dxc.hlsl | 2 +- .../a12142.wgsl.expected.fxc.hlsl | 2 +- .../a12142.wgsl.expected.msl | 2 +- .../a12142.wgsl.expected.spvasm | 40 +++++----- .../a12142.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/aab3b9.wgsl | 2 +- .../aab3b9.wgsl.expected.dxc.hlsl | 2 +- .../aab3b9.wgsl.expected.fxc.hlsl | 2 +- .../aab3b9.wgsl.expected.msl | 2 +- .../aab3b9.wgsl.expected.spvasm | 38 +++++----- .../aab3b9.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/abfcc0.wgsl | 2 +- .../abfcc0.wgsl.expected.dxc.hlsl | 2 +- .../abfcc0.wgsl.expected.fxc.hlsl | 2 +- .../abfcc0.wgsl.expected.glsl | 6 +- .../abfcc0.wgsl.expected.msl | 2 +- .../abfcc0.wgsl.expected.spvasm | 4 +- .../abfcc0.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/ae5e39.wgsl | 2 +- .../ae5e39.wgsl.expected.dxc.hlsl | 2 +- .../ae5e39.wgsl.expected.fxc.hlsl | 2 +- .../ae5e39.wgsl.expected.msl | 2 +- .../ae5e39.wgsl.expected.spvasm | 40 +++++----- .../ae5e39.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/ae92a2.wgsl | 2 +- .../ae92a2.wgsl.expected.dxc.hlsl | 2 +- .../ae92a2.wgsl.expected.fxc.hlsl | 2 +- .../ae92a2.wgsl.expected.msl | 2 +- .../ae92a2.wgsl.expected.spvasm | 22 +++--- .../ae92a2.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/b7c55c.wgsl | 2 +- .../b7c55c.wgsl.expected.dxc.hlsl | 2 +- .../b7c55c.wgsl.expected.fxc.hlsl | 2 +- .../b7c55c.wgsl.expected.glsl | 6 +- .../b7c55c.wgsl.expected.msl | 2 +- .../b7c55c.wgsl.expected.spvasm | 41 +++++----- .../b7c55c.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/c32df7.wgsl | 2 +- .../c32df7.wgsl.expected.dxc.hlsl | 2 +- .../c32df7.wgsl.expected.fxc.hlsl | 2 +- .../c32df7.wgsl.expected.glsl | 6 +- .../c32df7.wgsl.expected.msl | 2 +- .../c32df7.wgsl.expected.spvasm | 4 +- .../c32df7.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/c6aca6.wgsl | 2 +- .../c6aca6.wgsl.expected.dxc.hlsl | 2 +- .../c6aca6.wgsl.expected.fxc.hlsl | 2 +- .../c6aca6.wgsl.expected.glsl | 6 +- .../c6aca6.wgsl.expected.msl | 2 +- .../c6aca6.wgsl.expected.spvasm | 4 +- .../c6aca6.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/cdfe0f.wgsl | 2 +- .../cdfe0f.wgsl.expected.dxc.hlsl | 2 +- .../cdfe0f.wgsl.expected.fxc.hlsl | 2 +- .../cdfe0f.wgsl.expected.msl | 2 +- .../cdfe0f.wgsl.expected.spvasm | 42 +++++----- .../cdfe0f.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/dcbecb.wgsl | 2 +- .../dcbecb.wgsl.expected.dxc.hlsl | 2 +- .../dcbecb.wgsl.expected.fxc.hlsl | 2 +- .../dcbecb.wgsl.expected.glsl | 6 +- .../dcbecb.wgsl.expected.msl | 2 +- .../dcbecb.wgsl.expected.spvasm | 31 ++++---- .../dcbecb.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/e6ce9e.wgsl | 2 +- .../e6ce9e.wgsl.expected.dxc.hlsl | 2 +- .../e6ce9e.wgsl.expected.fxc.hlsl | 2 +- .../e6ce9e.wgsl.expected.msl | 2 +- .../e6ce9e.wgsl.expected.spvasm | 43 ++++++----- .../e6ce9e.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/f3b2c8.wgsl | 2 +- .../f3b2c8.wgsl.expected.dxc.hlsl | 2 +- .../f3b2c8.wgsl.expected.fxc.hlsl | 2 +- .../f3b2c8.wgsl.expected.glsl | 6 +- .../f3b2c8.wgsl.expected.msl | 2 +- .../f3b2c8.wgsl.expected.spvasm | 35 ++++----- .../f3b2c8.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/faa6d7.wgsl | 2 +- .../faa6d7.wgsl.expected.dxc.hlsl | 2 +- .../faa6d7.wgsl.expected.fxc.hlsl | 2 +- .../faa6d7.wgsl.expected.glsl | 6 +- .../faa6d7.wgsl.expected.msl | 2 +- .../faa6d7.wgsl.expected.spvasm | 40 +++++----- .../faa6d7.wgsl.expected.wgsl | 2 +- .../literal/textureSampleLevel/ff11bc.wgsl | 2 +- .../ff11bc.wgsl.expected.dxc.hlsl | 2 +- .../ff11bc.wgsl.expected.fxc.hlsl | 2 +- .../ff11bc.wgsl.expected.msl | 2 +- .../ff11bc.wgsl.expected.spvasm | 40 +++++----- .../ff11bc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/00ca64.wgsl | 2 +- .../00ca64.wgsl.expected.dxc.hlsl | 2 +- .../00ca64.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/00ca64.wgsl.expected.glsl | 6 +- .../textureStore/00ca64.wgsl.expected.msl | 2 +- .../textureStore/00ca64.wgsl.expected.spvasm | 38 +++++----- .../textureStore/00ca64.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/0148bd.wgsl | 2 +- .../0148bd.wgsl.expected.dxc.hlsl | 2 +- .../0148bd.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/0148bd.wgsl.expected.glsl | 6 +- .../textureStore/0148bd.wgsl.expected.msl | 2 +- .../textureStore/0148bd.wgsl.expected.spvasm | 38 +++++----- .../textureStore/0148bd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/05ce15.wgsl | 2 +- .../05ce15.wgsl.expected.dxc.hlsl | 2 +- .../05ce15.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/05ce15.wgsl.expected.glsl | 6 +- .../textureStore/05ce15.wgsl.expected.msl | 2 +- .../textureStore/05ce15.wgsl.expected.spvasm | 30 ++++---- .../textureStore/05ce15.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/064c7f.wgsl | 2 +- .../064c7f.wgsl.expected.dxc.hlsl | 2 +- .../064c7f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/064c7f.wgsl.expected.msl | 2 +- .../textureStore/064c7f.wgsl.expected.spvasm | 30 ++++---- .../textureStore/064c7f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/068641.wgsl | 2 +- .../068641.wgsl.expected.dxc.hlsl | 2 +- .../068641.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/068641.wgsl.expected.glsl | 6 +- .../textureStore/068641.wgsl.expected.msl | 2 +- .../textureStore/068641.wgsl.expected.spvasm | 32 ++++---- .../textureStore/068641.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/06e49c.wgsl | 2 +- .../06e49c.wgsl.expected.dxc.hlsl | 2 +- .../06e49c.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/06e49c.wgsl.expected.glsl | 6 +- .../textureStore/06e49c.wgsl.expected.msl | 2 +- .../textureStore/06e49c.wgsl.expected.spvasm | 37 +++++---- .../textureStore/06e49c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/07548b.wgsl | 2 +- .../07548b.wgsl.expected.dxc.hlsl | 2 +- .../07548b.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/07548b.wgsl.expected.glsl | 6 +- .../textureStore/07548b.wgsl.expected.msl | 2 +- .../textureStore/07548b.wgsl.expected.spvasm | 32 ++++---- .../textureStore/07548b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/0a1a79.wgsl | 2 +- .../0a1a79.wgsl.expected.dxc.hlsl | 2 +- .../0a1a79.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/0a1a79.wgsl.expected.glsl | 6 +- .../textureStore/0a1a79.wgsl.expected.msl | 2 +- .../textureStore/0a1a79.wgsl.expected.spvasm | 38 +++++----- .../textureStore/0a1a79.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/0af6b5.wgsl | 2 +- .../0af6b5.wgsl.expected.dxc.hlsl | 2 +- .../0af6b5.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/0af6b5.wgsl.expected.glsl | 6 +- .../textureStore/0af6b5.wgsl.expected.msl | 2 +- .../textureStore/0af6b5.wgsl.expected.spvasm | 30 ++++---- .../textureStore/0af6b5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/0c3dff.wgsl | 2 +- .../0c3dff.wgsl.expected.dxc.hlsl | 2 +- .../0c3dff.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/0c3dff.wgsl.expected.glsl | 6 +- .../textureStore/0c3dff.wgsl.expected.msl | 2 +- .../textureStore/0c3dff.wgsl.expected.spvasm | 32 ++++---- .../textureStore/0c3dff.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/0cc825.wgsl | 2 +- .../0cc825.wgsl.expected.dxc.hlsl | 2 +- .../0cc825.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/0cc825.wgsl.expected.glsl | 6 +- .../textureStore/0cc825.wgsl.expected.msl | 2 +- .../textureStore/0cc825.wgsl.expected.spvasm | 38 +++++----- .../textureStore/0cc825.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/102722.wgsl | 2 +- .../102722.wgsl.expected.dxc.hlsl | 2 +- .../102722.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/102722.wgsl.expected.msl | 2 +- .../textureStore/102722.wgsl.expected.spvasm | 29 +++---- .../textureStore/102722.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/158cf0.wgsl | 2 +- .../158cf0.wgsl.expected.dxc.hlsl | 2 +- .../158cf0.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/158cf0.wgsl.expected.glsl | 6 +- .../textureStore/158cf0.wgsl.expected.msl | 2 +- .../textureStore/158cf0.wgsl.expected.spvasm | 37 ++++----- .../textureStore/158cf0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/1839f2.wgsl | 2 +- .../1839f2.wgsl.expected.dxc.hlsl | 2 +- .../1839f2.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/1839f2.wgsl.expected.glsl | 6 +- .../textureStore/1839f2.wgsl.expected.msl | 2 +- .../textureStore/1839f2.wgsl.expected.spvasm | 32 ++++---- .../textureStore/1839f2.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/1a7d35.wgsl | 2 +- .../1a7d35.wgsl.expected.dxc.hlsl | 2 +- .../1a7d35.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/1a7d35.wgsl.expected.glsl | 6 +- .../textureStore/1a7d35.wgsl.expected.msl | 2 +- .../textureStore/1a7d35.wgsl.expected.spvasm | 36 +++++---- .../textureStore/1a7d35.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/1bbd08.wgsl | 2 +- .../1bbd08.wgsl.expected.dxc.hlsl | 2 +- .../1bbd08.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/1bbd08.wgsl.expected.glsl | 6 +- .../textureStore/1bbd08.wgsl.expected.msl | 2 +- .../textureStore/1bbd08.wgsl.expected.spvasm | 30 ++++---- .../textureStore/1bbd08.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/1c02e7.wgsl | 2 +- .../1c02e7.wgsl.expected.dxc.hlsl | 2 +- .../1c02e7.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/1c02e7.wgsl.expected.glsl | 6 +- .../textureStore/1c02e7.wgsl.expected.msl | 2 +- .../textureStore/1c02e7.wgsl.expected.spvasm | 37 ++++----- .../textureStore/1c02e7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/1dc954.wgsl | 2 +- .../1dc954.wgsl.expected.dxc.hlsl | 2 +- .../1dc954.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/1dc954.wgsl.expected.msl | 2 +- .../textureStore/1dc954.wgsl.expected.spvasm | 29 +++---- .../textureStore/1dc954.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/1e20f2.wgsl | 2 +- .../1e20f2.wgsl.expected.dxc.hlsl | 2 +- .../1e20f2.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/1e20f2.wgsl.expected.glsl | 6 +- .../textureStore/1e20f2.wgsl.expected.msl | 2 +- .../textureStore/1e20f2.wgsl.expected.spvasm | 30 ++++---- .../textureStore/1e20f2.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/1f1ef8.wgsl | 2 +- .../1f1ef8.wgsl.expected.dxc.hlsl | 2 +- .../1f1ef8.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/1f1ef8.wgsl.expected.glsl | 6 +- .../textureStore/1f1ef8.wgsl.expected.msl | 2 +- .../textureStore/1f1ef8.wgsl.expected.spvasm | 38 +++++----- .../textureStore/1f1ef8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/207fdd.wgsl | 2 +- .../207fdd.wgsl.expected.dxc.hlsl | 2 +- .../207fdd.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/207fdd.wgsl.expected.glsl | 6 +- .../textureStore/207fdd.wgsl.expected.msl | 2 +- .../textureStore/207fdd.wgsl.expected.spvasm | 30 ++++---- .../textureStore/207fdd.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/22d955.wgsl | 2 +- .../22d955.wgsl.expected.dxc.hlsl | 2 +- .../22d955.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/22d955.wgsl.expected.glsl | 6 +- .../textureStore/22d955.wgsl.expected.msl | 2 +- .../textureStore/22d955.wgsl.expected.spvasm | 36 +++++---- .../textureStore/22d955.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/22f045.wgsl | 2 +- .../22f045.wgsl.expected.dxc.hlsl | 2 +- .../22f045.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/22f045.wgsl.expected.glsl | 6 +- .../textureStore/22f045.wgsl.expected.msl | 2 +- .../textureStore/22f045.wgsl.expected.spvasm | 37 +++++---- .../textureStore/22f045.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/2383fc.wgsl | 2 +- .../2383fc.wgsl.expected.dxc.hlsl | 2 +- .../2383fc.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/2383fc.wgsl.expected.glsl | 6 +- .../textureStore/2383fc.wgsl.expected.msl | 2 +- .../textureStore/2383fc.wgsl.expected.spvasm | 38 +++++----- .../textureStore/2383fc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/258ab0.wgsl | 2 +- .../258ab0.wgsl.expected.dxc.hlsl | 2 +- .../258ab0.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/258ab0.wgsl.expected.glsl | 6 +- .../textureStore/258ab0.wgsl.expected.msl | 2 +- .../textureStore/258ab0.wgsl.expected.spvasm | 37 +++++---- .../textureStore/258ab0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/26bf70.wgsl | 2 +- .../26bf70.wgsl.expected.dxc.hlsl | 2 +- .../26bf70.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/26bf70.wgsl.expected.glsl | 6 +- .../textureStore/26bf70.wgsl.expected.msl | 2 +- .../textureStore/26bf70.wgsl.expected.spvasm | 32 ++++---- .../textureStore/26bf70.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/2796b4.wgsl | 2 +- .../2796b4.wgsl.expected.dxc.hlsl | 2 +- .../2796b4.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/2796b4.wgsl.expected.msl | 2 +- .../textureStore/2796b4.wgsl.expected.spvasm | 31 ++++---- .../textureStore/2796b4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/285218.wgsl | 2 +- .../285218.wgsl.expected.dxc.hlsl | 2 +- .../285218.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/285218.wgsl.expected.msl | 2 +- .../textureStore/285218.wgsl.expected.spvasm | 27 +++---- .../textureStore/285218.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/28a7ec.wgsl | 2 +- .../28a7ec.wgsl.expected.dxc.hlsl | 2 +- .../28a7ec.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/28a7ec.wgsl.expected.glsl | 6 +- .../textureStore/28a7ec.wgsl.expected.msl | 2 +- .../textureStore/28a7ec.wgsl.expected.spvasm | 38 +++++----- .../textureStore/28a7ec.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/2ac6c7.wgsl | 2 +- .../2ac6c7.wgsl.expected.dxc.hlsl | 2 +- .../2ac6c7.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/2ac6c7.wgsl.expected.msl | 2 +- .../textureStore/2ac6c7.wgsl.expected.spvasm | 27 +++---- .../textureStore/2ac6c7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/2d2835.wgsl | 2 +- .../2d2835.wgsl.expected.dxc.hlsl | 2 +- .../2d2835.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/2d2835.wgsl.expected.msl | 2 +- .../textureStore/2d2835.wgsl.expected.spvasm | 34 +++++---- .../textureStore/2d2835.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/2e6102.wgsl | 2 +- .../2e6102.wgsl.expected.dxc.hlsl | 2 +- .../2e6102.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/2e6102.wgsl.expected.glsl | 6 +- .../textureStore/2e6102.wgsl.expected.msl | 2 +- .../textureStore/2e6102.wgsl.expected.spvasm | 30 ++++---- .../textureStore/2e6102.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/2eb2a4.wgsl | 2 +- .../2eb2a4.wgsl.expected.dxc.hlsl | 2 +- .../2eb2a4.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/2eb2a4.wgsl.expected.msl | 2 +- .../textureStore/2eb2a4.wgsl.expected.spvasm | 29 +++---- .../textureStore/2eb2a4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/2ed2a3.wgsl | 2 +- .../2ed2a3.wgsl.expected.dxc.hlsl | 2 +- .../2ed2a3.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/2ed2a3.wgsl.expected.msl | 2 +- .../textureStore/2ed2a3.wgsl.expected.spvasm | 27 +++---- .../textureStore/2ed2a3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/30b0b0.wgsl | 2 +- .../30b0b0.wgsl.expected.dxc.hlsl | 2 +- .../30b0b0.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/30b0b0.wgsl.expected.glsl | 6 +- .../textureStore/30b0b0.wgsl.expected.msl | 2 +- .../textureStore/30b0b0.wgsl.expected.spvasm | 38 +++++----- .../textureStore/30b0b0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/31745b.wgsl | 2 +- .../31745b.wgsl.expected.dxc.hlsl | 2 +- .../31745b.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/31745b.wgsl.expected.msl | 2 +- .../textureStore/31745b.wgsl.expected.spvasm | 31 ++++---- .../textureStore/31745b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/32f368.wgsl | 2 +- .../32f368.wgsl.expected.dxc.hlsl | 2 +- .../32f368.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/32f368.wgsl.expected.glsl | 6 +- .../textureStore/32f368.wgsl.expected.msl | 2 +- .../textureStore/32f368.wgsl.expected.spvasm | 34 +++++---- .../textureStore/32f368.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/330b7c.wgsl | 2 +- .../330b7c.wgsl.expected.dxc.hlsl | 2 +- .../330b7c.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/330b7c.wgsl.expected.glsl | 6 +- .../textureStore/330b7c.wgsl.expected.msl | 2 +- .../textureStore/330b7c.wgsl.expected.spvasm | 34 +++++---- .../textureStore/330b7c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/331aee.wgsl | 2 +- .../331aee.wgsl.expected.dxc.hlsl | 2 +- .../331aee.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/331aee.wgsl.expected.glsl | 6 +- .../textureStore/331aee.wgsl.expected.msl | 2 +- .../textureStore/331aee.wgsl.expected.spvasm | 30 ++++---- .../textureStore/331aee.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/33cec0.wgsl | 2 +- .../33cec0.wgsl.expected.dxc.hlsl | 2 +- .../33cec0.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/33cec0.wgsl.expected.glsl | 6 +- .../textureStore/33cec0.wgsl.expected.msl | 2 +- .../textureStore/33cec0.wgsl.expected.spvasm | 38 +++++----- .../textureStore/33cec0.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/37ffd4.wgsl | 2 +- .../37ffd4.wgsl.expected.dxc.hlsl | 2 +- .../37ffd4.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/37ffd4.wgsl.expected.glsl | 6 +- .../textureStore/37ffd4.wgsl.expected.msl | 2 +- .../textureStore/37ffd4.wgsl.expected.spvasm | 37 +++++---- .../textureStore/37ffd4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/38e8d7.wgsl | 2 +- .../38e8d7.wgsl.expected.dxc.hlsl | 2 +- .../38e8d7.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/38e8d7.wgsl.expected.glsl | 6 +- .../textureStore/38e8d7.wgsl.expected.msl | 2 +- .../textureStore/38e8d7.wgsl.expected.spvasm | 36 +++++---- .../textureStore/38e8d7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/3a52ac.wgsl | 2 +- .../3a52ac.wgsl.expected.dxc.hlsl | 2 +- .../3a52ac.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/3a52ac.wgsl.expected.glsl | 6 +- .../textureStore/3a52ac.wgsl.expected.msl | 2 +- .../textureStore/3a52ac.wgsl.expected.spvasm | 37 ++++----- .../textureStore/3a52ac.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/3bb7a1.wgsl | 2 +- .../3bb7a1.wgsl.expected.dxc.hlsl | 2 +- .../3bb7a1.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/3bb7a1.wgsl.expected.glsl | 6 +- .../textureStore/3bb7a1.wgsl.expected.msl | 2 +- .../textureStore/3bb7a1.wgsl.expected.spvasm | 34 +++++---- .../textureStore/3bb7a1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/3bec15.wgsl | 2 +- .../3bec15.wgsl.expected.dxc.hlsl | 2 +- .../3bec15.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/3bec15.wgsl.expected.msl | 2 +- .../textureStore/3bec15.wgsl.expected.spvasm | 29 +++---- .../textureStore/3bec15.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/3c1937.wgsl | 2 +- .../3c1937.wgsl.expected.dxc.hlsl | 2 +- .../3c1937.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/3c1937.wgsl.expected.msl | 2 +- .../textureStore/3c1937.wgsl.expected.spvasm | 2 +- .../textureStore/3c1937.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/3d6f01.wgsl | 2 +- .../3d6f01.wgsl.expected.dxc.hlsl | 2 +- .../3d6f01.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/3d6f01.wgsl.expected.msl | 2 +- .../textureStore/3d6f01.wgsl.expected.spvasm | 29 +++---- .../textureStore/3d6f01.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/40c455.wgsl | 2 +- .../40c455.wgsl.expected.dxc.hlsl | 2 +- .../40c455.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/40c455.wgsl.expected.glsl | 6 +- .../textureStore/40c455.wgsl.expected.msl | 2 +- .../textureStore/40c455.wgsl.expected.spvasm | 30 ++++---- .../textureStore/40c455.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/4288fc.wgsl | 2 +- .../4288fc.wgsl.expected.dxc.hlsl | 2 +- .../4288fc.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/4288fc.wgsl.expected.glsl | 6 +- .../textureStore/4288fc.wgsl.expected.msl | 2 +- .../textureStore/4288fc.wgsl.expected.spvasm | 30 ++++---- .../textureStore/4288fc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/441ba8.wgsl | 2 +- .../441ba8.wgsl.expected.dxc.hlsl | 2 +- .../441ba8.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/441ba8.wgsl.expected.glsl | 6 +- .../textureStore/441ba8.wgsl.expected.msl | 2 +- .../textureStore/441ba8.wgsl.expected.spvasm | 32 ++++---- .../textureStore/441ba8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/44daa7.wgsl | 2 +- .../44daa7.wgsl.expected.dxc.hlsl | 2 +- .../44daa7.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/44daa7.wgsl.expected.glsl | 6 +- .../textureStore/44daa7.wgsl.expected.msl | 2 +- .../textureStore/44daa7.wgsl.expected.spvasm | 37 +++++---- .../textureStore/44daa7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/486500.wgsl | 2 +- .../486500.wgsl.expected.dxc.hlsl | 2 +- .../486500.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/486500.wgsl.expected.glsl | 6 +- .../textureStore/486500.wgsl.expected.msl | 2 +- .../textureStore/486500.wgsl.expected.spvasm | 32 ++++---- .../textureStore/486500.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/4c454f.wgsl | 2 +- .../4c454f.wgsl.expected.dxc.hlsl | 2 +- .../4c454f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/4c454f.wgsl.expected.msl | 2 +- .../textureStore/4c454f.wgsl.expected.spvasm | 36 +++++---- .../textureStore/4c454f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/4d359d.wgsl | 2 +- .../4d359d.wgsl.expected.dxc.hlsl | 2 +- .../4d359d.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/4d359d.wgsl.expected.msl | 2 +- .../textureStore/4d359d.wgsl.expected.spvasm | 38 +++++----- .../textureStore/4d359d.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/4fc057.wgsl | 2 +- .../4fc057.wgsl.expected.dxc.hlsl | 2 +- .../4fc057.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/4fc057.wgsl.expected.glsl | 6 +- .../textureStore/4fc057.wgsl.expected.msl | 2 +- .../textureStore/4fc057.wgsl.expected.spvasm | 34 +++++---- .../textureStore/4fc057.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/506a71.wgsl | 2 +- .../506a71.wgsl.expected.dxc.hlsl | 2 +- .../506a71.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/506a71.wgsl.expected.msl | 2 +- .../textureStore/506a71.wgsl.expected.spvasm | 31 ++++---- .../textureStore/506a71.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/52f503.wgsl | 2 +- .../52f503.wgsl.expected.dxc.hlsl | 2 +- .../52f503.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/52f503.wgsl.expected.glsl | 6 +- .../textureStore/52f503.wgsl.expected.msl | 2 +- .../textureStore/52f503.wgsl.expected.spvasm | 32 ++++---- .../textureStore/52f503.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/5841f8.wgsl | 2 +- .../5841f8.wgsl.expected.dxc.hlsl | 2 +- .../5841f8.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/5841f8.wgsl.expected.glsl | 6 +- .../textureStore/5841f8.wgsl.expected.msl | 2 +- .../textureStore/5841f8.wgsl.expected.spvasm | 34 +++++---- .../textureStore/5841f8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/59a0ab.wgsl | 2 +- .../59a0ab.wgsl.expected.dxc.hlsl | 2 +- .../59a0ab.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/59a0ab.wgsl.expected.glsl | 6 +- .../textureStore/59a0ab.wgsl.expected.msl | 2 +- .../textureStore/59a0ab.wgsl.expected.spvasm | 37 +++++---- .../textureStore/59a0ab.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/5a2f8f.wgsl | 2 +- .../5a2f8f.wgsl.expected.dxc.hlsl | 2 +- .../5a2f8f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/5a2f8f.wgsl.expected.msl | 2 +- .../textureStore/5a2f8f.wgsl.expected.spvasm | 2 +- .../textureStore/5a2f8f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/5bc4f3.wgsl | 2 +- .../5bc4f3.wgsl.expected.dxc.hlsl | 2 +- .../5bc4f3.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/5bc4f3.wgsl.expected.msl | 2 +- .../textureStore/5bc4f3.wgsl.expected.spvasm | 37 ++++----- .../textureStore/5bc4f3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/5ddc61.wgsl | 2 +- .../5ddc61.wgsl.expected.dxc.hlsl | 2 +- .../5ddc61.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/5ddc61.wgsl.expected.glsl | 6 +- .../textureStore/5ddc61.wgsl.expected.msl | 2 +- .../textureStore/5ddc61.wgsl.expected.spvasm | 38 +++++----- .../textureStore/5ddc61.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/5f9a49.wgsl | 2 +- .../5f9a49.wgsl.expected.dxc.hlsl | 2 +- .../5f9a49.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/5f9a49.wgsl.expected.glsl | 6 +- .../textureStore/5f9a49.wgsl.expected.msl | 2 +- .../textureStore/5f9a49.wgsl.expected.spvasm | 34 +++++---- .../textureStore/5f9a49.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/602b5a.wgsl | 2 +- .../602b5a.wgsl.expected.dxc.hlsl | 2 +- .../602b5a.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/602b5a.wgsl.expected.msl | 2 +- .../textureStore/602b5a.wgsl.expected.spvasm | 27 +++---- .../textureStore/602b5a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/60975f.wgsl | 2 +- .../60975f.wgsl.expected.dxc.hlsl | 2 +- .../60975f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/60975f.wgsl.expected.glsl | 6 +- .../textureStore/60975f.wgsl.expected.msl | 2 +- .../textureStore/60975f.wgsl.expected.spvasm | 34 +++++---- .../textureStore/60975f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/658a74.wgsl | 2 +- .../658a74.wgsl.expected.dxc.hlsl | 2 +- .../658a74.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/658a74.wgsl.expected.msl | 2 +- .../textureStore/658a74.wgsl.expected.spvasm | 37 +++++---- .../textureStore/658a74.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/682fd6.wgsl | 2 +- .../682fd6.wgsl.expected.dxc.hlsl | 2 +- .../682fd6.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/682fd6.wgsl.expected.msl | 2 +- .../textureStore/682fd6.wgsl.expected.spvasm | 32 ++++---- .../textureStore/682fd6.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/699a1b.wgsl | 2 +- .../699a1b.wgsl.expected.dxc.hlsl | 2 +- .../699a1b.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/699a1b.wgsl.expected.glsl | 6 +- .../textureStore/699a1b.wgsl.expected.msl | 2 +- .../textureStore/699a1b.wgsl.expected.spvasm | 34 +++++---- .../textureStore/699a1b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/6b75c3.wgsl | 2 +- .../6b75c3.wgsl.expected.dxc.hlsl | 2 +- .../6b75c3.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/6b75c3.wgsl.expected.msl | 2 +- .../textureStore/6b75c3.wgsl.expected.spvasm | 27 +++---- .../textureStore/6b75c3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/6b80d2.wgsl | 2 +- .../6b80d2.wgsl.expected.dxc.hlsl | 2 +- .../6b80d2.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/6b80d2.wgsl.expected.msl | 2 +- .../textureStore/6b80d2.wgsl.expected.spvasm | 2 +- .../textureStore/6b80d2.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/6cff2e.wgsl | 2 +- .../6cff2e.wgsl.expected.dxc.hlsl | 2 +- .../6cff2e.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/6cff2e.wgsl.expected.glsl | 6 +- .../textureStore/6cff2e.wgsl.expected.msl | 2 +- .../textureStore/6cff2e.wgsl.expected.spvasm | 32 ++++---- .../textureStore/6cff2e.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/6da692.wgsl | 2 +- .../6da692.wgsl.expected.dxc.hlsl | 2 +- .../6da692.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/6da692.wgsl.expected.glsl | 6 +- .../textureStore/6da692.wgsl.expected.msl | 2 +- .../textureStore/6da692.wgsl.expected.spvasm | 36 +++++---- .../textureStore/6da692.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/6f8642.wgsl | 2 +- .../6f8642.wgsl.expected.dxc.hlsl | 2 +- .../6f8642.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/6f8642.wgsl.expected.glsl | 6 +- .../textureStore/6f8642.wgsl.expected.msl | 2 +- .../textureStore/6f8642.wgsl.expected.spvasm | 38 +++++----- .../textureStore/6f8642.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/726472.wgsl | 2 +- .../726472.wgsl.expected.dxc.hlsl | 2 +- .../726472.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/726472.wgsl.expected.msl | 2 +- .../textureStore/726472.wgsl.expected.spvasm | 30 ++++---- .../textureStore/726472.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/72fa64.wgsl | 2 +- .../72fa64.wgsl.expected.dxc.hlsl | 2 +- .../72fa64.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/72fa64.wgsl.expected.msl | 2 +- .../textureStore/72fa64.wgsl.expected.spvasm | 38 +++++----- .../textureStore/72fa64.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/731349.wgsl | 2 +- .../731349.wgsl.expected.dxc.hlsl | 2 +- .../731349.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/731349.wgsl.expected.glsl | 6 +- .../textureStore/731349.wgsl.expected.msl | 2 +- .../textureStore/731349.wgsl.expected.spvasm | 30 ++++---- .../textureStore/731349.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/73bbbc.wgsl | 2 +- .../73bbbc.wgsl.expected.dxc.hlsl | 2 +- .../73bbbc.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/73bbbc.wgsl.expected.glsl | 6 +- .../textureStore/73bbbc.wgsl.expected.msl | 2 +- .../textureStore/73bbbc.wgsl.expected.spvasm | 30 ++++---- .../textureStore/73bbbc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/752da6.wgsl | 2 +- .../752da6.wgsl.expected.dxc.hlsl | 2 +- .../752da6.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/752da6.wgsl.expected.glsl | 6 +- .../textureStore/752da6.wgsl.expected.msl | 2 +- .../textureStore/752da6.wgsl.expected.spvasm | 31 ++++---- .../textureStore/752da6.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/779d14.wgsl | 2 +- .../779d14.wgsl.expected.dxc.hlsl | 2 +- .../779d14.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/779d14.wgsl.expected.glsl | 6 +- .../textureStore/779d14.wgsl.expected.msl | 2 +- .../textureStore/779d14.wgsl.expected.spvasm | 37 ++++----- .../textureStore/779d14.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/77c0ae.wgsl | 2 +- .../77c0ae.wgsl.expected.dxc.hlsl | 2 +- .../77c0ae.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/77c0ae.wgsl.expected.glsl | 6 +- .../textureStore/77c0ae.wgsl.expected.msl | 2 +- .../textureStore/77c0ae.wgsl.expected.spvasm | 32 ++++---- .../textureStore/77c0ae.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/7bb211.wgsl | 2 +- .../7bb211.wgsl.expected.dxc.hlsl | 2 +- .../7bb211.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/7bb211.wgsl.expected.msl | 2 +- .../textureStore/7bb211.wgsl.expected.spvasm | 38 +++++----- .../textureStore/7bb211.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/7cec8d.wgsl | 2 +- .../7cec8d.wgsl.expected.dxc.hlsl | 2 +- .../7cec8d.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/7cec8d.wgsl.expected.glsl | 6 +- .../textureStore/7cec8d.wgsl.expected.msl | 2 +- .../textureStore/7cec8d.wgsl.expected.spvasm | 37 ++++----- .../textureStore/7cec8d.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/7cf6e7.wgsl | 2 +- .../7cf6e7.wgsl.expected.dxc.hlsl | 2 +- .../7cf6e7.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/7cf6e7.wgsl.expected.glsl | 6 +- .../textureStore/7cf6e7.wgsl.expected.msl | 2 +- .../textureStore/7cf6e7.wgsl.expected.spvasm | 30 ++++---- .../textureStore/7cf6e7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/7f7fae.wgsl | 2 +- .../7f7fae.wgsl.expected.dxc.hlsl | 2 +- .../7f7fae.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/7f7fae.wgsl.expected.msl | 2 +- .../textureStore/7f7fae.wgsl.expected.spvasm | 27 +++---- .../textureStore/7f7fae.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/804942.wgsl | 2 +- .../804942.wgsl.expected.dxc.hlsl | 2 +- .../804942.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/804942.wgsl.expected.glsl | 6 +- .../textureStore/804942.wgsl.expected.msl | 2 +- .../textureStore/804942.wgsl.expected.spvasm | 31 ++++---- .../textureStore/804942.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/805dae.wgsl | 2 +- .../805dae.wgsl.expected.dxc.hlsl | 2 +- .../805dae.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/805dae.wgsl.expected.glsl | 6 +- .../textureStore/805dae.wgsl.expected.msl | 2 +- .../textureStore/805dae.wgsl.expected.spvasm | 30 ++++---- .../textureStore/805dae.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/83bcc1.wgsl | 2 +- .../83bcc1.wgsl.expected.dxc.hlsl | 2 +- .../83bcc1.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/83bcc1.wgsl.expected.msl | 2 +- .../textureStore/83bcc1.wgsl.expected.spvasm | 29 +++---- .../textureStore/83bcc1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/872747.wgsl | 2 +- .../872747.wgsl.expected.dxc.hlsl | 2 +- .../872747.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/872747.wgsl.expected.msl | 2 +- .../textureStore/872747.wgsl.expected.spvasm | 27 +++---- .../textureStore/872747.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8b9310.wgsl | 2 +- .../8b9310.wgsl.expected.dxc.hlsl | 2 +- .../8b9310.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8b9310.wgsl.expected.glsl | 6 +- .../textureStore/8b9310.wgsl.expected.msl | 2 +- .../textureStore/8b9310.wgsl.expected.spvasm | 30 ++++---- .../textureStore/8b9310.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8bb287.wgsl | 2 +- .../8bb287.wgsl.expected.dxc.hlsl | 2 +- .../8bb287.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8bb287.wgsl.expected.glsl | 6 +- .../textureStore/8bb287.wgsl.expected.msl | 2 +- .../textureStore/8bb287.wgsl.expected.spvasm | 36 +++++---- .../textureStore/8bb287.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8c76e9.wgsl | 2 +- .../8c76e9.wgsl.expected.dxc.hlsl | 2 +- .../8c76e9.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8c76e9.wgsl.expected.msl | 2 +- .../textureStore/8c76e9.wgsl.expected.spvasm | 29 +++---- .../textureStore/8c76e9.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8dc54f.wgsl | 2 +- .../8dc54f.wgsl.expected.dxc.hlsl | 2 +- .../8dc54f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8dc54f.wgsl.expected.glsl | 6 +- .../textureStore/8dc54f.wgsl.expected.msl | 2 +- .../textureStore/8dc54f.wgsl.expected.spvasm | 31 ++++---- .../textureStore/8dc54f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8e0479.wgsl | 2 +- .../8e0479.wgsl.expected.dxc.hlsl | 2 +- .../8e0479.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8e0479.wgsl.expected.glsl | 6 +- .../textureStore/8e0479.wgsl.expected.msl | 2 +- .../textureStore/8e0479.wgsl.expected.spvasm | 36 +++++---- .../textureStore/8e0479.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8ed9f8.wgsl | 2 +- .../8ed9f8.wgsl.expected.dxc.hlsl | 2 +- .../8ed9f8.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8ed9f8.wgsl.expected.glsl | 6 +- .../textureStore/8ed9f8.wgsl.expected.msl | 2 +- .../textureStore/8ed9f8.wgsl.expected.spvasm | 30 ++++---- .../textureStore/8ed9f8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8f71a1.wgsl | 2 +- .../8f71a1.wgsl.expected.dxc.hlsl | 2 +- .../8f71a1.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8f71a1.wgsl.expected.glsl | 6 +- .../textureStore/8f71a1.wgsl.expected.msl | 2 +- .../textureStore/8f71a1.wgsl.expected.spvasm | 31 ++++---- .../textureStore/8f71a1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/8ff674.wgsl | 2 +- .../8ff674.wgsl.expected.dxc.hlsl | 2 +- .../8ff674.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/8ff674.wgsl.expected.glsl | 6 +- .../textureStore/8ff674.wgsl.expected.msl | 2 +- .../textureStore/8ff674.wgsl.expected.spvasm | 38 +++++----- .../textureStore/8ff674.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/958353.wgsl | 2 +- .../958353.wgsl.expected.dxc.hlsl | 2 +- .../958353.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/958353.wgsl.expected.msl | 2 +- .../textureStore/958353.wgsl.expected.spvasm | 29 +++---- .../textureStore/958353.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/959d94.wgsl | 2 +- .../959d94.wgsl.expected.dxc.hlsl | 2 +- .../959d94.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/959d94.wgsl.expected.msl | 2 +- .../textureStore/959d94.wgsl.expected.spvasm | 27 +++---- .../textureStore/959d94.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/95e452.wgsl | 2 +- .../95e452.wgsl.expected.dxc.hlsl | 2 +- .../95e452.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/95e452.wgsl.expected.glsl | 6 +- .../textureStore/95e452.wgsl.expected.msl | 2 +- .../textureStore/95e452.wgsl.expected.spvasm | 32 ++++---- .../textureStore/95e452.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/969534.wgsl | 2 +- .../969534.wgsl.expected.dxc.hlsl | 2 +- .../969534.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/969534.wgsl.expected.msl | 2 +- .../textureStore/969534.wgsl.expected.spvasm | 2 +- .../textureStore/969534.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/9938b7.wgsl | 2 +- .../9938b7.wgsl.expected.dxc.hlsl | 2 +- .../9938b7.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/9938b7.wgsl.expected.glsl | 6 +- .../textureStore/9938b7.wgsl.expected.msl | 2 +- .../textureStore/9938b7.wgsl.expected.spvasm | 38 +++++----- .../textureStore/9938b7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/9a3ecc.wgsl | 2 +- .../9a3ecc.wgsl.expected.dxc.hlsl | 2 +- .../9a3ecc.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/9a3ecc.wgsl.expected.glsl | 6 +- .../textureStore/9a3ecc.wgsl.expected.msl | 2 +- .../textureStore/9a3ecc.wgsl.expected.spvasm | 31 ++++---- .../textureStore/9a3ecc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/9d8668.wgsl | 2 +- .../9d8668.wgsl.expected.dxc.hlsl | 2 +- .../9d8668.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/9d8668.wgsl.expected.glsl | 6 +- .../textureStore/9d8668.wgsl.expected.msl | 2 +- .../textureStore/9d8668.wgsl.expected.spvasm | 37 +++++---- .../textureStore/9d8668.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/9d9cd5.wgsl | 2 +- .../9d9cd5.wgsl.expected.dxc.hlsl | 2 +- .../9d9cd5.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/9d9cd5.wgsl.expected.glsl | 6 +- .../textureStore/9d9cd5.wgsl.expected.msl | 2 +- .../textureStore/9d9cd5.wgsl.expected.spvasm | 34 +++++---- .../textureStore/9d9cd5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/9e3ec5.wgsl | 2 +- .../9e3ec5.wgsl.expected.dxc.hlsl | 2 +- .../9e3ec5.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/9e3ec5.wgsl.expected.glsl | 6 +- .../textureStore/9e3ec5.wgsl.expected.msl | 2 +- .../textureStore/9e3ec5.wgsl.expected.spvasm | 31 ++++---- .../textureStore/9e3ec5.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/9f5318.wgsl | 2 +- .../9f5318.wgsl.expected.dxc.hlsl | 2 +- .../9f5318.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/9f5318.wgsl.expected.msl | 2 +- .../textureStore/9f5318.wgsl.expected.spvasm | 32 ++++---- .../textureStore/9f5318.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/9f7cea.wgsl | 2 +- .../9f7cea.wgsl.expected.dxc.hlsl | 2 +- .../9f7cea.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/9f7cea.wgsl.expected.glsl | 6 +- .../textureStore/9f7cea.wgsl.expected.msl | 2 +- .../textureStore/9f7cea.wgsl.expected.spvasm | 38 +++++----- .../textureStore/9f7cea.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/a0f96e.wgsl | 2 +- .../a0f96e.wgsl.expected.dxc.hlsl | 2 +- .../a0f96e.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/a0f96e.wgsl.expected.glsl | 6 +- .../textureStore/a0f96e.wgsl.expected.msl | 2 +- .../textureStore/a0f96e.wgsl.expected.spvasm | 34 +++++---- .../textureStore/a0f96e.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/a1352c.wgsl | 2 +- .../a1352c.wgsl.expected.dxc.hlsl | 2 +- .../a1352c.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/a1352c.wgsl.expected.glsl | 6 +- .../textureStore/a1352c.wgsl.expected.msl | 2 +- .../textureStore/a1352c.wgsl.expected.spvasm | 36 +++++---- .../textureStore/a1352c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/a4c338.wgsl | 2 +- .../a4c338.wgsl.expected.dxc.hlsl | 2 +- .../a4c338.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/a4c338.wgsl.expected.msl | 2 +- .../textureStore/a4c338.wgsl.expected.spvasm | 27 +++---- .../textureStore/a4c338.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/a5e80d.wgsl | 2 +- .../a5e80d.wgsl.expected.dxc.hlsl | 2 +- .../a5e80d.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/a5e80d.wgsl.expected.glsl | 6 +- .../textureStore/a5e80d.wgsl.expected.msl | 2 +- .../textureStore/a5e80d.wgsl.expected.spvasm | 30 ++++---- .../textureStore/a5e80d.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/a6a986.wgsl | 2 +- .../a6a986.wgsl.expected.dxc.hlsl | 2 +- .../a6a986.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/a6a986.wgsl.expected.glsl | 6 +- .../textureStore/a6a986.wgsl.expected.msl | 2 +- .../textureStore/a6a986.wgsl.expected.spvasm | 37 +++++---- .../textureStore/a6a986.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/a6e78f.wgsl | 2 +- .../a6e78f.wgsl.expected.dxc.hlsl | 2 +- .../a6e78f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/a6e78f.wgsl.expected.msl | 2 +- .../textureStore/a6e78f.wgsl.expected.spvasm | 2 +- .../textureStore/a6e78f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/a9426c.wgsl | 2 +- .../a9426c.wgsl.expected.dxc.hlsl | 2 +- .../a9426c.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/a9426c.wgsl.expected.glsl | 6 +- .../textureStore/a9426c.wgsl.expected.msl | 2 +- .../textureStore/a9426c.wgsl.expected.spvasm | 37 ++++----- .../textureStore/a9426c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/ac67aa.wgsl | 2 +- .../ac67aa.wgsl.expected.dxc.hlsl | 2 +- .../ac67aa.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/ac67aa.wgsl.expected.msl | 2 +- .../textureStore/ac67aa.wgsl.expected.spvasm | 32 ++++---- .../textureStore/ac67aa.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/aeb38a.wgsl | 2 +- .../aeb38a.wgsl.expected.dxc.hlsl | 2 +- .../aeb38a.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/aeb38a.wgsl.expected.glsl | 6 +- .../textureStore/aeb38a.wgsl.expected.msl | 2 +- .../textureStore/aeb38a.wgsl.expected.spvasm | 31 ++++---- .../textureStore/aeb38a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/b42fd3.wgsl | 2 +- .../b42fd3.wgsl.expected.dxc.hlsl | 2 +- .../b42fd3.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/b42fd3.wgsl.expected.glsl | 6 +- .../textureStore/b42fd3.wgsl.expected.msl | 2 +- .../textureStore/b42fd3.wgsl.expected.spvasm | 37 ++++----- .../textureStore/b42fd3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/b706b1.wgsl | 2 +- .../b706b1.wgsl.expected.dxc.hlsl | 2 +- .../b706b1.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/b706b1.wgsl.expected.glsl | 6 +- .../textureStore/b706b1.wgsl.expected.msl | 2 +- .../textureStore/b706b1.wgsl.expected.spvasm | 31 ++++---- .../textureStore/b706b1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/b70ded.wgsl | 2 +- .../b70ded.wgsl.expected.dxc.hlsl | 2 +- .../b70ded.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/b70ded.wgsl.expected.msl | 2 +- .../textureStore/b70ded.wgsl.expected.spvasm | 2 +- .../textureStore/b70ded.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/b76ff3.wgsl | 2 +- .../b76ff3.wgsl.expected.dxc.hlsl | 2 +- .../b76ff3.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/b76ff3.wgsl.expected.glsl | 6 +- .../textureStore/b76ff3.wgsl.expected.msl | 2 +- .../textureStore/b76ff3.wgsl.expected.spvasm | 32 ++++---- .../textureStore/b76ff3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/b77161.wgsl | 2 +- .../b77161.wgsl.expected.dxc.hlsl | 2 +- .../b77161.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/b77161.wgsl.expected.msl | 2 +- .../textureStore/b77161.wgsl.expected.spvasm | 2 +- .../textureStore/b77161.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/bbcb7f.wgsl | 2 +- .../bbcb7f.wgsl.expected.dxc.hlsl | 2 +- .../bbcb7f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/bbcb7f.wgsl.expected.glsl | 6 +- .../textureStore/bbcb7f.wgsl.expected.msl | 2 +- .../textureStore/bbcb7f.wgsl.expected.spvasm | 31 ++++---- .../textureStore/bbcb7f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/be6e30.wgsl | 2 +- .../be6e30.wgsl.expected.dxc.hlsl | 2 +- .../be6e30.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/be6e30.wgsl.expected.glsl | 6 +- .../textureStore/be6e30.wgsl.expected.msl | 2 +- .../textureStore/be6e30.wgsl.expected.spvasm | 30 ++++---- .../textureStore/be6e30.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/bf775c.wgsl | 2 +- .../bf775c.wgsl.expected.dxc.hlsl | 2 +- .../bf775c.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/bf775c.wgsl.expected.msl | 2 +- .../textureStore/bf775c.wgsl.expected.spvasm | 2 +- .../textureStore/bf775c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/c1f29e.wgsl | 2 +- .../c1f29e.wgsl.expected.dxc.hlsl | 2 +- .../c1f29e.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/c1f29e.wgsl.expected.msl | 2 +- .../textureStore/c1f29e.wgsl.expected.spvasm | 27 +++---- .../textureStore/c1f29e.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/c2ca46.wgsl | 2 +- .../c2ca46.wgsl.expected.dxc.hlsl | 2 +- .../c2ca46.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/c2ca46.wgsl.expected.glsl | 6 +- .../textureStore/c2ca46.wgsl.expected.msl | 2 +- .../textureStore/c2ca46.wgsl.expected.spvasm | 36 +++++---- .../textureStore/c2ca46.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/c32905.wgsl | 2 +- .../c32905.wgsl.expected.dxc.hlsl | 2 +- .../c32905.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/c32905.wgsl.expected.glsl | 6 +- .../textureStore/c32905.wgsl.expected.msl | 2 +- .../textureStore/c32905.wgsl.expected.spvasm | 38 +++++----- .../textureStore/c32905.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/c5af1e.wgsl | 2 +- .../c5af1e.wgsl.expected.dxc.hlsl | 2 +- .../c5af1e.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/c5af1e.wgsl.expected.glsl | 6 +- .../textureStore/c5af1e.wgsl.expected.msl | 2 +- .../textureStore/c5af1e.wgsl.expected.spvasm | 30 ++++---- .../textureStore/c5af1e.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/c863be.wgsl | 2 +- .../c863be.wgsl.expected.dxc.hlsl | 2 +- .../c863be.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/c863be.wgsl.expected.msl | 2 +- .../textureStore/c863be.wgsl.expected.spvasm | 34 +++++---- .../textureStore/c863be.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/cb3b0b.wgsl | 2 +- .../cb3b0b.wgsl.expected.dxc.hlsl | 2 +- .../cb3b0b.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/cb3b0b.wgsl.expected.glsl | 6 +- .../textureStore/cb3b0b.wgsl.expected.msl | 2 +- .../textureStore/cb3b0b.wgsl.expected.spvasm | 32 ++++---- .../textureStore/cb3b0b.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/d26166.wgsl | 2 +- .../d26166.wgsl.expected.dxc.hlsl | 2 +- .../d26166.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/d26166.wgsl.expected.msl | 2 +- .../textureStore/d26166.wgsl.expected.spvasm | 2 +- .../textureStore/d26166.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/d55e65.wgsl | 2 +- .../d55e65.wgsl.expected.dxc.hlsl | 2 +- .../d55e65.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/d55e65.wgsl.expected.glsl | 6 +- .../textureStore/d55e65.wgsl.expected.msl | 2 +- .../textureStore/d55e65.wgsl.expected.spvasm | 37 +++++---- .../textureStore/d55e65.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/d73b5c.wgsl | 2 +- .../d73b5c.wgsl.expected.dxc.hlsl | 2 +- .../d73b5c.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/d73b5c.wgsl.expected.msl | 2 +- .../textureStore/d73b5c.wgsl.expected.spvasm | 2 +- .../textureStore/d73b5c.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/d82b0a.wgsl | 2 +- .../d82b0a.wgsl.expected.dxc.hlsl | 2 +- .../d82b0a.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/d82b0a.wgsl.expected.msl | 2 +- .../textureStore/d82b0a.wgsl.expected.spvasm | 32 ++++---- .../textureStore/d82b0a.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/db92a2.wgsl | 2 +- .../db92a2.wgsl.expected.dxc.hlsl | 2 +- .../db92a2.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/db92a2.wgsl.expected.glsl | 6 +- .../textureStore/db92a2.wgsl.expected.msl | 2 +- .../textureStore/db92a2.wgsl.expected.spvasm | 31 ++++---- .../textureStore/db92a2.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/dd7d81.wgsl | 2 +- .../dd7d81.wgsl.expected.dxc.hlsl | 2 +- .../dd7d81.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/dd7d81.wgsl.expected.glsl | 6 +- .../textureStore/dd7d81.wgsl.expected.msl | 2 +- .../textureStore/dd7d81.wgsl.expected.spvasm | 30 ++++---- .../textureStore/dd7d81.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/dde364.wgsl | 2 +- .../dde364.wgsl.expected.dxc.hlsl | 2 +- .../dde364.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/dde364.wgsl.expected.msl | 2 +- .../textureStore/dde364.wgsl.expected.spvasm | 36 +++++---- .../textureStore/dde364.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/de4b94.wgsl | 2 +- .../de4b94.wgsl.expected.dxc.hlsl | 2 +- .../de4b94.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/de4b94.wgsl.expected.msl | 2 +- .../textureStore/de4b94.wgsl.expected.spvasm | 29 +++---- .../textureStore/de4b94.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/df2ca4.wgsl | 2 +- .../df2ca4.wgsl.expected.dxc.hlsl | 2 +- .../df2ca4.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/df2ca4.wgsl.expected.glsl | 6 +- .../textureStore/df2ca4.wgsl.expected.msl | 2 +- .../textureStore/df2ca4.wgsl.expected.spvasm | 37 +++++---- .../textureStore/df2ca4.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/dfa9a1.wgsl | 2 +- .../dfa9a1.wgsl.expected.dxc.hlsl | 2 +- .../dfa9a1.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/dfa9a1.wgsl.expected.msl | 2 +- .../textureStore/dfa9a1.wgsl.expected.spvasm | 37 +++++---- .../textureStore/dfa9a1.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/dffb13.wgsl | 2 +- .../dffb13.wgsl.expected.dxc.hlsl | 2 +- .../dffb13.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/dffb13.wgsl.expected.msl | 2 +- .../textureStore/dffb13.wgsl.expected.spvasm | 38 +++++----- .../textureStore/dffb13.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/e7c6d8.wgsl | 2 +- .../e7c6d8.wgsl.expected.dxc.hlsl | 2 +- .../e7c6d8.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/e7c6d8.wgsl.expected.msl | 2 +- .../textureStore/e7c6d8.wgsl.expected.spvasm | 27 +++---- .../textureStore/e7c6d8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/e885e8.wgsl | 2 +- .../e885e8.wgsl.expected.dxc.hlsl | 2 +- .../e885e8.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/e885e8.wgsl.expected.msl | 2 +- .../textureStore/e885e8.wgsl.expected.spvasm | 27 +++---- .../textureStore/e885e8.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/e8cbf7.wgsl | 2 +- .../e8cbf7.wgsl.expected.dxc.hlsl | 2 +- .../e8cbf7.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/e8cbf7.wgsl.expected.glsl | 6 +- .../textureStore/e8cbf7.wgsl.expected.msl | 2 +- .../textureStore/e8cbf7.wgsl.expected.spvasm | 31 ++++---- .../textureStore/e8cbf7.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/eb702f.wgsl | 2 +- .../eb702f.wgsl.expected.dxc.hlsl | 2 +- .../eb702f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/eb702f.wgsl.expected.glsl | 6 +- .../textureStore/eb702f.wgsl.expected.msl | 2 +- .../textureStore/eb702f.wgsl.expected.spvasm | 30 ++++---- .../textureStore/eb702f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/eb78b9.wgsl | 2 +- .../eb78b9.wgsl.expected.dxc.hlsl | 2 +- .../eb78b9.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/eb78b9.wgsl.expected.glsl | 6 +- .../textureStore/eb78b9.wgsl.expected.msl | 2 +- .../textureStore/eb78b9.wgsl.expected.spvasm | 31 ++++---- .../textureStore/eb78b9.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/ee6acc.wgsl | 2 +- .../ee6acc.wgsl.expected.dxc.hlsl | 2 +- .../ee6acc.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/ee6acc.wgsl.expected.msl | 2 +- .../textureStore/ee6acc.wgsl.expected.spvasm | 30 ++++---- .../textureStore/ee6acc.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/ef9f2f.wgsl | 2 +- .../ef9f2f.wgsl.expected.dxc.hlsl | 2 +- .../ef9f2f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/ef9f2f.wgsl.expected.glsl | 6 +- .../textureStore/ef9f2f.wgsl.expected.msl | 2 +- .../textureStore/ef9f2f.wgsl.expected.spvasm | 32 ++++---- .../textureStore/ef9f2f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/f1e6d3.wgsl | 2 +- .../f1e6d3.wgsl.expected.dxc.hlsl | 2 +- .../f1e6d3.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/f1e6d3.wgsl.expected.glsl | 6 +- .../textureStore/f1e6d3.wgsl.expected.msl | 2 +- .../textureStore/f1e6d3.wgsl.expected.spvasm | 32 ++++---- .../textureStore/f1e6d3.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/f8dead.wgsl | 2 +- .../f8dead.wgsl.expected.dxc.hlsl | 2 +- .../f8dead.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/f8dead.wgsl.expected.glsl | 6 +- .../textureStore/f8dead.wgsl.expected.msl | 2 +- .../textureStore/f8dead.wgsl.expected.spvasm | 32 ++++---- .../textureStore/f8dead.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/f9be83.wgsl | 2 +- .../f9be83.wgsl.expected.dxc.hlsl | 2 +- .../f9be83.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/f9be83.wgsl.expected.msl | 2 +- .../textureStore/f9be83.wgsl.expected.spvasm | 37 ++++----- .../textureStore/f9be83.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/fb9a8f.wgsl | 2 +- .../fb9a8f.wgsl.expected.dxc.hlsl | 2 +- .../fb9a8f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/fb9a8f.wgsl.expected.msl | 2 +- .../textureStore/fb9a8f.wgsl.expected.spvasm | 29 +++---- .../textureStore/fb9a8f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/fbf53f.wgsl | 2 +- .../fbf53f.wgsl.expected.dxc.hlsl | 2 +- .../fbf53f.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/fbf53f.wgsl.expected.glsl | 6 +- .../textureStore/fbf53f.wgsl.expected.msl | 2 +- .../textureStore/fbf53f.wgsl.expected.spvasm | 37 ++++----- .../textureStore/fbf53f.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/fcbe66.wgsl | 2 +- .../fcbe66.wgsl.expected.dxc.hlsl | 2 +- .../fcbe66.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/fcbe66.wgsl.expected.msl | 2 +- .../textureStore/fcbe66.wgsl.expected.spvasm | 30 ++++---- .../textureStore/fcbe66.wgsl.expected.wgsl | 2 +- .../gen/literal/textureStore/fd350c.wgsl | 2 +- .../fd350c.wgsl.expected.dxc.hlsl | 2 +- .../fd350c.wgsl.expected.fxc.hlsl | 2 +- .../textureStore/fd350c.wgsl.expected.glsl | 6 +- .../textureStore/fd350c.wgsl.expected.msl | 2 +- .../textureStore/fd350c.wgsl.expected.spvasm | 38 +++++----- .../textureStore/fd350c.wgsl.expected.wgsl | 2 +- test/tint/builtins/gen/var/cross/041cb0.wgsl | 4 +- .../var/cross/041cb0.wgsl.expected.dxc.hlsl | 4 +- .../var/cross/041cb0.wgsl.expected.fxc.hlsl | 4 +- .../gen/var/cross/041cb0.wgsl.expected.glsl | 12 +-- .../gen/var/cross/041cb0.wgsl.expected.msl | 4 +- .../gen/var/cross/041cb0.wgsl.expected.spvasm | 49 ++++++------ .../gen/var/cross/041cb0.wgsl.expected.wgsl | 4 +- test/tint/builtins/gen/var/cross/9857cb.wgsl | 4 +- .../gen/var/cross/9857cb.wgsl.expected.wgsl | 4 +- .../gen/var/pack2x16float/0e97b3.wgsl | 2 +- .../0e97b3.wgsl.expected.dxc.hlsl | 2 +- .../0e97b3.wgsl.expected.fxc.hlsl | 2 +- .../pack2x16float/0e97b3.wgsl.expected.glsl | 6 +- .../pack2x16float/0e97b3.wgsl.expected.msl | 2 +- .../pack2x16float/0e97b3.wgsl.expected.spvasm | 45 +++++------ .../pack2x16float/0e97b3.wgsl.expected.wgsl | 2 +- .../gen/var/pack2x16snorm/6c169b.wgsl | 2 +- .../6c169b.wgsl.expected.dxc.hlsl | 2 +- .../6c169b.wgsl.expected.fxc.hlsl | 2 +- .../pack2x16snorm/6c169b.wgsl.expected.glsl | 6 +- .../pack2x16snorm/6c169b.wgsl.expected.msl | 2 +- .../pack2x16snorm/6c169b.wgsl.expected.spvasm | 45 +++++------ .../pack2x16snorm/6c169b.wgsl.expected.wgsl | 2 +- .../gen/var/pack2x16unorm/0f08e4.wgsl | 2 +- .../0f08e4.wgsl.expected.dxc.hlsl | 2 +- .../0f08e4.wgsl.expected.fxc.hlsl | 2 +- .../pack2x16unorm/0f08e4.wgsl.expected.glsl | 6 +- .../pack2x16unorm/0f08e4.wgsl.expected.msl | 2 +- .../pack2x16unorm/0f08e4.wgsl.expected.spvasm | 45 +++++------ .../pack2x16unorm/0f08e4.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/pack4x8snorm/4d22e7.wgsl | 2 +- .../4d22e7.wgsl.expected.dxc.hlsl | 2 +- .../4d22e7.wgsl.expected.fxc.hlsl | 2 +- .../pack4x8snorm/4d22e7.wgsl.expected.glsl | 6 +- .../var/pack4x8snorm/4d22e7.wgsl.expected.msl | 2 +- .../pack4x8snorm/4d22e7.wgsl.expected.spvasm | 41 +++++----- .../pack4x8snorm/4d22e7.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/pack4x8unorm/95c456.wgsl | 2 +- .../95c456.wgsl.expected.dxc.hlsl | 2 +- .../95c456.wgsl.expected.fxc.hlsl | 2 +- .../pack4x8unorm/95c456.wgsl.expected.glsl | 6 +- .../var/pack4x8unorm/95c456.wgsl.expected.msl | 2 +- .../pack4x8unorm/95c456.wgsl.expected.spvasm | 41 +++++----- .../pack4x8unorm/95c456.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/0166ec.wgsl | 2 +- .../0166ec.wgsl.expected.dxc.hlsl | 2 +- .../0166ec.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/0166ec.wgsl.expected.glsl | 6 +- .../textureGather/0166ec.wgsl.expected.msl | 2 +- .../textureGather/0166ec.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/0166ec.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/04fa78.wgsl | 2 +- .../04fa78.wgsl.expected.dxc.hlsl | 2 +- .../04fa78.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/04fa78.wgsl.expected.msl | 2 +- .../textureGather/04fa78.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/04fa78.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/10c554.wgsl | 2 +- .../10c554.wgsl.expected.dxc.hlsl | 2 +- .../10c554.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/10c554.wgsl.expected.glsl | 6 +- .../textureGather/10c554.wgsl.expected.msl | 2 +- .../textureGather/10c554.wgsl.expected.spvasm | 47 ++++++------ .../textureGather/10c554.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/11b2db.wgsl | 2 +- .../11b2db.wgsl.expected.dxc.hlsl | 2 +- .../11b2db.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/11b2db.wgsl.expected.glsl | 6 +- .../textureGather/11b2db.wgsl.expected.msl | 2 +- .../textureGather/11b2db.wgsl.expected.spvasm | 47 ++++++------ .../textureGather/11b2db.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/17baac.wgsl | 2 +- .../17baac.wgsl.expected.dxc.hlsl | 2 +- .../17baac.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/17baac.wgsl.expected.glsl | 6 +- .../textureGather/17baac.wgsl.expected.msl | 2 +- .../textureGather/17baac.wgsl.expected.spvasm | 61 +++++++-------- .../textureGather/17baac.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/1bf0ab.wgsl | 2 +- .../1bf0ab.wgsl.expected.dxc.hlsl | 2 +- .../1bf0ab.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/1bf0ab.wgsl.expected.glsl | 6 +- .../textureGather/1bf0ab.wgsl.expected.msl | 2 +- .../textureGather/1bf0ab.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/1bf0ab.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/1f7f6b.wgsl | 4 +- .../1f7f6b.wgsl.expected.dxc.hlsl | 4 +- .../1f7f6b.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/1f7f6b.wgsl.expected.glsl | 12 +-- .../textureGather/1f7f6b.wgsl.expected.msl | 4 +- .../textureGather/1f7f6b.wgsl.expected.spvasm | 50 ++++++------ .../textureGather/1f7f6b.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/22e930.wgsl | 2 +- .../22e930.wgsl.expected.dxc.hlsl | 2 +- .../22e930.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/22e930.wgsl.expected.glsl | 6 +- .../textureGather/22e930.wgsl.expected.msl | 2 +- .../textureGather/22e930.wgsl.expected.spvasm | 61 +++++++-------- .../textureGather/22e930.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/238ec4.wgsl | 4 +- .../238ec4.wgsl.expected.dxc.hlsl | 4 +- .../238ec4.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/238ec4.wgsl.expected.glsl | 12 +-- .../textureGather/238ec4.wgsl.expected.msl | 4 +- .../textureGather/238ec4.wgsl.expected.spvasm | 64 ++++++++-------- .../textureGather/238ec4.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/24b0bd.wgsl | 2 +- .../24b0bd.wgsl.expected.dxc.hlsl | 2 +- .../24b0bd.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/24b0bd.wgsl.expected.glsl | 6 +- .../textureGather/24b0bd.wgsl.expected.msl | 2 +- .../textureGather/24b0bd.wgsl.expected.spvasm | 61 +++++++-------- .../textureGather/24b0bd.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/269250.wgsl | 2 +- .../269250.wgsl.expected.dxc.hlsl | 2 +- .../269250.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/269250.wgsl.expected.glsl | 6 +- .../textureGather/269250.wgsl.expected.msl | 2 +- .../textureGather/269250.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/269250.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/2a4f40.wgsl | 2 +- .../2a4f40.wgsl.expected.dxc.hlsl | 2 +- .../2a4f40.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/2a4f40.wgsl.expected.glsl | 6 +- .../textureGather/2a4f40.wgsl.expected.msl | 2 +- .../textureGather/2a4f40.wgsl.expected.spvasm | 61 +++++++-------- .../textureGather/2a4f40.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/2cc066.wgsl | 2 +- .../2cc066.wgsl.expected.dxc.hlsl | 2 +- .../2cc066.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/2cc066.wgsl.expected.glsl | 6 +- .../textureGather/2cc066.wgsl.expected.msl | 2 +- .../textureGather/2cc066.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/2cc066.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/2e0ed5.wgsl | 2 +- .../2e0ed5.wgsl.expected.dxc.hlsl | 2 +- .../2e0ed5.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/2e0ed5.wgsl.expected.glsl | 6 +- .../textureGather/2e0ed5.wgsl.expected.msl | 2 +- .../textureGather/2e0ed5.wgsl.expected.spvasm | 47 ++++++------ .../textureGather/2e0ed5.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/32c4e8.wgsl | 2 +- .../32c4e8.wgsl.expected.dxc.hlsl | 2 +- .../32c4e8.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/32c4e8.wgsl.expected.glsl | 6 +- .../textureGather/32c4e8.wgsl.expected.msl | 2 +- .../textureGather/32c4e8.wgsl.expected.spvasm | 47 ++++++------ .../textureGather/32c4e8.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/3b32cc.wgsl | 2 +- .../3b32cc.wgsl.expected.dxc.hlsl | 2 +- .../3b32cc.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/3b32cc.wgsl.expected.glsl | 6 +- .../textureGather/3b32cc.wgsl.expected.msl | 2 +- .../textureGather/3b32cc.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/3b32cc.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/43025d.wgsl | 2 +- .../43025d.wgsl.expected.dxc.hlsl | 2 +- .../43025d.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/43025d.wgsl.expected.msl | 2 +- .../textureGather/43025d.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/43025d.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/445793.wgsl | 2 +- .../445793.wgsl.expected.dxc.hlsl | 2 +- .../445793.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/445793.wgsl.expected.glsl | 6 +- .../textureGather/445793.wgsl.expected.msl | 2 +- .../textureGather/445793.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/445793.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/49b07f.wgsl | 4 +- .../49b07f.wgsl.expected.dxc.hlsl | 4 +- .../49b07f.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/49b07f.wgsl.expected.glsl | 12 +-- .../textureGather/49b07f.wgsl.expected.msl | 4 +- .../textureGather/49b07f.wgsl.expected.spvasm | 53 ++++++------- .../textureGather/49b07f.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/4b8103.wgsl | 4 +- .../4b8103.wgsl.expected.dxc.hlsl | 4 +- .../4b8103.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/4b8103.wgsl.expected.glsl | 12 +-- .../textureGather/4b8103.wgsl.expected.msl | 4 +- .../textureGather/4b8103.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/4b8103.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/4e8ac5.wgsl | 2 +- .../4e8ac5.wgsl.expected.dxc.hlsl | 2 +- .../4e8ac5.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/4e8ac5.wgsl.expected.glsl | 6 +- .../textureGather/4e8ac5.wgsl.expected.msl | 2 +- .../textureGather/4e8ac5.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/4e8ac5.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/5266da.wgsl | 2 +- .../5266da.wgsl.expected.dxc.hlsl | 2 +- .../5266da.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/5266da.wgsl.expected.glsl | 6 +- .../textureGather/5266da.wgsl.expected.msl | 2 +- .../textureGather/5266da.wgsl.expected.spvasm | 47 ++++++------ .../textureGather/5266da.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/59372a.wgsl | 4 +- .../59372a.wgsl.expected.dxc.hlsl | 4 +- .../59372a.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/59372a.wgsl.expected.glsl | 12 +-- .../textureGather/59372a.wgsl.expected.msl | 4 +- .../textureGather/59372a.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/59372a.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/5ba85f.wgsl | 2 +- .../5ba85f.wgsl.expected.dxc.hlsl | 2 +- .../5ba85f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/5ba85f.wgsl.expected.glsl | 6 +- .../textureGather/5ba85f.wgsl.expected.msl | 2 +- .../textureGather/5ba85f.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/5ba85f.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/5bd491.wgsl | 2 +- .../5bd491.wgsl.expected.dxc.hlsl | 2 +- .../5bd491.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/5bd491.wgsl.expected.glsl | 6 +- .../textureGather/5bd491.wgsl.expected.msl | 2 +- .../textureGather/5bd491.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/5bd491.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/6b7b74.wgsl | 4 +- .../6b7b74.wgsl.expected.dxc.hlsl | 4 +- .../6b7b74.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/6b7b74.wgsl.expected.glsl | 12 +-- .../textureGather/6b7b74.wgsl.expected.msl | 4 +- .../textureGather/6b7b74.wgsl.expected.spvasm | 68 +++++++++-------- .../textureGather/6b7b74.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/751f8a.wgsl | 2 +- .../751f8a.wgsl.expected.dxc.hlsl | 2 +- .../751f8a.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/751f8a.wgsl.expected.msl | 2 +- .../textureGather/751f8a.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/751f8a.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/788010.wgsl | 2 +- .../788010.wgsl.expected.dxc.hlsl | 2 +- .../788010.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/788010.wgsl.expected.msl | 2 +- .../textureGather/788010.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/788010.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/7c3828.wgsl | 4 +- .../7c3828.wgsl.expected.dxc.hlsl | 4 +- .../7c3828.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/7c3828.wgsl.expected.glsl | 12 +-- .../textureGather/7c3828.wgsl.expected.msl | 4 +- .../textureGather/7c3828.wgsl.expected.spvasm | 53 ++++++------- .../textureGather/7c3828.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/7dd226.wgsl | 2 +- .../7dd226.wgsl.expected.dxc.hlsl | 2 +- .../7dd226.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/7dd226.wgsl.expected.msl | 2 +- .../textureGather/7dd226.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/7dd226.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/829357.wgsl | 2 +- .../829357.wgsl.expected.dxc.hlsl | 2 +- .../829357.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/829357.wgsl.expected.msl | 2 +- .../textureGather/829357.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/829357.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/831549.wgsl | 4 +- .../831549.wgsl.expected.dxc.hlsl | 4 +- .../831549.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/831549.wgsl.expected.glsl | 12 +-- .../textureGather/831549.wgsl.expected.msl | 4 +- .../textureGather/831549.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/831549.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/8578bc.wgsl | 2 +- .../8578bc.wgsl.expected.dxc.hlsl | 2 +- .../8578bc.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/8578bc.wgsl.expected.msl | 2 +- .../textureGather/8578bc.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/8578bc.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/89680f.wgsl | 2 +- .../89680f.wgsl.expected.dxc.hlsl | 2 +- .../89680f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/89680f.wgsl.expected.glsl | 6 +- .../textureGather/89680f.wgsl.expected.msl | 2 +- .../textureGather/89680f.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/89680f.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/8b754c.wgsl | 2 +- .../8b754c.wgsl.expected.dxc.hlsl | 2 +- .../8b754c.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/8b754c.wgsl.expected.glsl | 6 +- .../textureGather/8b754c.wgsl.expected.msl | 2 +- .../textureGather/8b754c.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/8b754c.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/8fae00.wgsl | 2 +- .../8fae00.wgsl.expected.dxc.hlsl | 2 +- .../8fae00.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/8fae00.wgsl.expected.glsl | 6 +- .../textureGather/8fae00.wgsl.expected.msl | 2 +- .../textureGather/8fae00.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/8fae00.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/92ea47.wgsl | 2 +- .../92ea47.wgsl.expected.dxc.hlsl | 2 +- .../92ea47.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/92ea47.wgsl.expected.glsl | 6 +- .../textureGather/92ea47.wgsl.expected.msl | 2 +- .../textureGather/92ea47.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/92ea47.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/986700.wgsl | 4 +- .../986700.wgsl.expected.dxc.hlsl | 4 +- .../986700.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/986700.wgsl.expected.glsl | 12 +-- .../textureGather/986700.wgsl.expected.msl | 4 +- .../textureGather/986700.wgsl.expected.spvasm | 54 ++++++------- .../textureGather/986700.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/9a6358.wgsl | 2 +- .../9a6358.wgsl.expected.dxc.hlsl | 2 +- .../9a6358.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/9a6358.wgsl.expected.glsl | 6 +- .../textureGather/9a6358.wgsl.expected.msl | 2 +- .../textureGather/9a6358.wgsl.expected.spvasm | 61 +++++++-------- .../textureGather/9a6358.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/9ab41e.wgsl | 4 +- .../9ab41e.wgsl.expected.dxc.hlsl | 4 +- .../9ab41e.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/9ab41e.wgsl.expected.glsl | 12 +-- .../textureGather/9ab41e.wgsl.expected.msl | 4 +- .../textureGather/9ab41e.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/9ab41e.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/a0372b.wgsl | 2 +- .../a0372b.wgsl.expected.dxc.hlsl | 2 +- .../a0372b.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/a0372b.wgsl.expected.glsl | 6 +- .../textureGather/a0372b.wgsl.expected.msl | 2 +- .../textureGather/a0372b.wgsl.expected.spvasm | 65 ++++++++-------- .../textureGather/a0372b.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/a68027.wgsl | 4 +- .../a68027.wgsl.expected.dxc.hlsl | 4 +- .../a68027.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/a68027.wgsl.expected.glsl | 12 +-- .../textureGather/a68027.wgsl.expected.msl | 4 +- .../textureGather/a68027.wgsl.expected.spvasm | 64 ++++++++-------- .../textureGather/a68027.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/aaf6bd.wgsl | 2 +- .../aaf6bd.wgsl.expected.dxc.hlsl | 2 +- .../aaf6bd.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/aaf6bd.wgsl.expected.msl | 2 +- .../textureGather/aaf6bd.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/aaf6bd.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/af55b3.wgsl | 4 +- .../af55b3.wgsl.expected.dxc.hlsl | 4 +- .../af55b3.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/af55b3.wgsl.expected.glsl | 12 +-- .../textureGather/af55b3.wgsl.expected.msl | 4 +- .../textureGather/af55b3.wgsl.expected.spvasm | 49 ++++++------ .../textureGather/af55b3.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/bb3ac5.wgsl | 2 +- .../bb3ac5.wgsl.expected.dxc.hlsl | 2 +- .../bb3ac5.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/bb3ac5.wgsl.expected.glsl | 6 +- .../textureGather/bb3ac5.wgsl.expected.msl | 2 +- .../textureGather/bb3ac5.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/bb3ac5.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/bd33b6.wgsl | 4 +- .../bd33b6.wgsl.expected.dxc.hlsl | 4 +- .../bd33b6.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/bd33b6.wgsl.expected.glsl | 12 +-- .../textureGather/bd33b6.wgsl.expected.msl | 4 +- .../textureGather/bd33b6.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/bd33b6.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/be276f.wgsl | 2 +- .../be276f.wgsl.expected.dxc.hlsl | 2 +- .../be276f.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/be276f.wgsl.expected.msl | 2 +- .../textureGather/be276f.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/be276f.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/c0640c.wgsl | 2 +- .../c0640c.wgsl.expected.dxc.hlsl | 2 +- .../c0640c.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/c0640c.wgsl.expected.msl | 2 +- .../textureGather/c0640c.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/c0640c.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/ccadde.wgsl | 2 +- .../ccadde.wgsl.expected.dxc.hlsl | 2 +- .../ccadde.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/ccadde.wgsl.expected.glsl | 6 +- .../textureGather/ccadde.wgsl.expected.msl | 2 +- .../textureGather/ccadde.wgsl.expected.spvasm | 51 +++++++------ .../textureGather/ccadde.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/ce5578.wgsl | 4 +- .../ce5578.wgsl.expected.dxc.hlsl | 4 +- .../ce5578.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/ce5578.wgsl.expected.glsl | 12 +-- .../textureGather/ce5578.wgsl.expected.msl | 4 +- .../textureGather/ce5578.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/ce5578.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/cf9112.wgsl | 4 +- .../cf9112.wgsl.expected.dxc.hlsl | 4 +- .../cf9112.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/cf9112.wgsl.expected.glsl | 12 +-- .../textureGather/cf9112.wgsl.expected.msl | 4 +- .../textureGather/cf9112.wgsl.expected.spvasm | 68 +++++++++-------- .../textureGather/cf9112.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/d1f187.wgsl | 4 +- .../d1f187.wgsl.expected.dxc.hlsl | 4 +- .../d1f187.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/d1f187.wgsl.expected.glsl | 12 +-- .../textureGather/d1f187.wgsl.expected.msl | 4 +- .../textureGather/d1f187.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/d1f187.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/d4b5c6.wgsl | 2 +- .../d4b5c6.wgsl.expected.dxc.hlsl | 2 +- .../d4b5c6.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d4b5c6.wgsl.expected.msl | 2 +- .../textureGather/d4b5c6.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/d4b5c6.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/d6507c.wgsl | 4 +- .../d6507c.wgsl.expected.dxc.hlsl | 4 +- .../d6507c.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/d6507c.wgsl.expected.glsl | 12 +-- .../textureGather/d6507c.wgsl.expected.msl | 4 +- .../textureGather/d6507c.wgsl.expected.spvasm | 50 ++++++------ .../textureGather/d6507c.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/d8e958.wgsl | 2 +- .../d8e958.wgsl.expected.dxc.hlsl | 2 +- .../d8e958.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d8e958.wgsl.expected.glsl | 6 +- .../textureGather/d8e958.wgsl.expected.msl | 2 +- .../textureGather/d8e958.wgsl.expected.spvasm | 47 ++++++------ .../textureGather/d8e958.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/d90605.wgsl | 4 +- .../d90605.wgsl.expected.dxc.hlsl | 4 +- .../d90605.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/d90605.wgsl.expected.glsl | 12 +-- .../textureGather/d90605.wgsl.expected.msl | 4 +- .../textureGather/d90605.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/d90605.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/d98d59.wgsl | 2 +- .../d98d59.wgsl.expected.dxc.hlsl | 2 +- .../d98d59.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/d98d59.wgsl.expected.msl | 2 +- .../textureGather/d98d59.wgsl.expected.spvasm | 63 +++++++-------- .../textureGather/d98d59.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/dc6661.wgsl | 4 +- .../dc6661.wgsl.expected.dxc.hlsl | 4 +- .../dc6661.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/dc6661.wgsl.expected.glsl | 12 +-- .../textureGather/dc6661.wgsl.expected.msl | 4 +- .../textureGather/dc6661.wgsl.expected.spvasm | 54 ++++++------- .../textureGather/dc6661.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/e2acac.wgsl | 2 +- .../e2acac.wgsl.expected.dxc.hlsl | 2 +- .../e2acac.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/e2acac.wgsl.expected.msl | 2 +- .../textureGather/e2acac.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/e2acac.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/e3165f.wgsl | 4 +- .../e3165f.wgsl.expected.dxc.hlsl | 4 +- .../e3165f.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/e3165f.wgsl.expected.glsl | 12 +-- .../textureGather/e3165f.wgsl.expected.msl | 4 +- .../textureGather/e3165f.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/e3165f.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/e9d390.wgsl | 4 +- .../e9d390.wgsl.expected.dxc.hlsl | 4 +- .../e9d390.wgsl.expected.fxc.hlsl | 4 +- .../textureGather/e9d390.wgsl.expected.glsl | 12 +-- .../textureGather/e9d390.wgsl.expected.msl | 4 +- .../textureGather/e9d390.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/e9d390.wgsl.expected.wgsl | 4 +- .../gen/var/textureGather/ea8eb4.wgsl | 2 +- .../ea8eb4.wgsl.expected.dxc.hlsl | 2 +- .../ea8eb4.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/ea8eb4.wgsl.expected.glsl | 6 +- .../textureGather/ea8eb4.wgsl.expected.msl | 2 +- .../textureGather/ea8eb4.wgsl.expected.spvasm | 61 +++++++-------- .../textureGather/ea8eb4.wgsl.expected.wgsl | 2 +- .../gen/var/textureGather/f2c6e3.wgsl | 2 +- .../f2c6e3.wgsl.expected.dxc.hlsl | 2 +- .../f2c6e3.wgsl.expected.fxc.hlsl | 2 +- .../textureGather/f2c6e3.wgsl.expected.msl | 2 +- .../textureGather/f2c6e3.wgsl.expected.spvasm | 67 ++++++++-------- .../textureGather/f2c6e3.wgsl.expected.wgsl | 2 +- .../gen/var/textureGatherCompare/144a9a.wgsl | 4 +- .../144a9a.wgsl.expected.dxc.hlsl | 4 +- .../144a9a.wgsl.expected.fxc.hlsl | 4 +- .../144a9a.wgsl.expected.glsl | 12 +-- .../144a9a.wgsl.expected.msl | 4 +- .../144a9a.wgsl.expected.spvasm | 66 ++++++++-------- .../144a9a.wgsl.expected.wgsl | 4 +- .../gen/var/textureGatherCompare/182fd4.wgsl | 2 +- .../182fd4.wgsl.expected.dxc.hlsl | 2 +- .../182fd4.wgsl.expected.fxc.hlsl | 2 +- .../182fd4.wgsl.expected.glsl | 6 +- .../182fd4.wgsl.expected.msl | 2 +- .../182fd4.wgsl.expected.spvasm | 49 ++++++------ .../182fd4.wgsl.expected.wgsl | 2 +- .../gen/var/textureGatherCompare/2e409c.wgsl | 2 +- .../2e409c.wgsl.expected.dxc.hlsl | 2 +- .../2e409c.wgsl.expected.fxc.hlsl | 2 +- .../2e409c.wgsl.expected.msl | 2 +- .../2e409c.wgsl.expected.spvasm | 65 ++++++++-------- .../2e409c.wgsl.expected.wgsl | 2 +- .../gen/var/textureGatherCompare/313add.wgsl | 4 +- .../313add.wgsl.expected.dxc.hlsl | 4 +- .../313add.wgsl.expected.fxc.hlsl | 4 +- .../313add.wgsl.expected.glsl | 12 +-- .../313add.wgsl.expected.msl | 4 +- .../313add.wgsl.expected.spvasm | 52 +++++++------ .../313add.wgsl.expected.wgsl | 4 +- .../gen/var/textureGatherCompare/60d2d1.wgsl | 2 +- .../60d2d1.wgsl.expected.dxc.hlsl | 2 +- .../60d2d1.wgsl.expected.fxc.hlsl | 2 +- .../60d2d1.wgsl.expected.msl | 2 +- .../60d2d1.wgsl.expected.spvasm | 65 ++++++++-------- .../60d2d1.wgsl.expected.wgsl | 2 +- .../gen/var/textureGatherCompare/6d9352.wgsl | 2 +- .../6d9352.wgsl.expected.dxc.hlsl | 2 +- .../6d9352.wgsl.expected.fxc.hlsl | 2 +- .../6d9352.wgsl.expected.glsl | 6 +- .../6d9352.wgsl.expected.msl | 2 +- .../6d9352.wgsl.expected.spvasm | 49 ++++++------ .../6d9352.wgsl.expected.wgsl | 2 +- .../gen/var/textureGatherCompare/783e65.wgsl | 2 +- .../783e65.wgsl.expected.dxc.hlsl | 2 +- .../783e65.wgsl.expected.fxc.hlsl | 2 +- .../783e65.wgsl.expected.glsl | 6 +- .../783e65.wgsl.expected.msl | 2 +- .../783e65.wgsl.expected.spvasm | 63 +++++++-------- .../783e65.wgsl.expected.wgsl | 2 +- .../gen/var/textureGatherCompare/b5bc43.wgsl | 2 +- .../b5bc43.wgsl.expected.dxc.hlsl | 2 +- .../b5bc43.wgsl.expected.fxc.hlsl | 2 +- .../b5bc43.wgsl.expected.glsl | 6 +- .../b5bc43.wgsl.expected.msl | 2 +- .../b5bc43.wgsl.expected.spvasm | 63 +++++++-------- .../b5bc43.wgsl.expected.wgsl | 2 +- .../gen/var/textureGatherCompare/f585cc.wgsl | 4 +- .../f585cc.wgsl.expected.dxc.hlsl | 4 +- .../f585cc.wgsl.expected.fxc.hlsl | 4 +- .../f585cc.wgsl.expected.glsl | 12 +-- .../f585cc.wgsl.expected.msl | 4 +- .../f585cc.wgsl.expected.spvasm | 65 ++++++++-------- .../f585cc.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureLoad/019da0.wgsl | 2 +- .../textureLoad/019da0.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/019da0.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/019da0.wgsl.expected.glsl | 6 +- .../var/textureLoad/019da0.wgsl.expected.msl | 2 +- .../textureLoad/019da0.wgsl.expected.spvasm | 46 +++++------ .../var/textureLoad/019da0.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/026217.wgsl | 2 +- .../textureLoad/026217.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/026217.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/026217.wgsl.expected.glsl | 6 +- .../var/textureLoad/026217.wgsl.expected.msl | 2 +- .../textureLoad/026217.wgsl.expected.spvasm | 63 +++++++-------- .../var/textureLoad/026217.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/04b911.wgsl | 2 +- .../textureLoad/04b911.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/04b911.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/04b911.wgsl.expected.glsl | 6 +- .../var/textureLoad/04b911.wgsl.expected.msl | 2 +- .../textureLoad/04b911.wgsl.expected.spvasm | 63 +++++++-------- .../var/textureLoad/04b911.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/168dc8.wgsl | 2 +- .../textureLoad/168dc8.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/168dc8.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/168dc8.wgsl.expected.glsl | 6 +- .../var/textureLoad/168dc8.wgsl.expected.msl | 2 +- .../textureLoad/168dc8.wgsl.expected.spvasm | 62 +++++++-------- .../var/textureLoad/168dc8.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/19cf87.wgsl | 2 +- .../textureLoad/19cf87.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/19cf87.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/19cf87.wgsl.expected.glsl | 6 +- .../var/textureLoad/19cf87.wgsl.expected.msl | 2 +- .../textureLoad/19cf87.wgsl.expected.spvasm | 49 ++++++------ .../var/textureLoad/19cf87.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/1b051f.wgsl | 2 +- .../textureLoad/1b051f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1b051f.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/1b051f.wgsl.expected.glsl | 6 +- .../var/textureLoad/1b051f.wgsl.expected.msl | 2 +- .../textureLoad/1b051f.wgsl.expected.spvasm | 62 +++++++-------- .../var/textureLoad/1b051f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/1bfdfb.wgsl | 2 +- .../textureLoad/1bfdfb.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1bfdfb.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/1bfdfb.wgsl.expected.glsl | 6 +- .../var/textureLoad/1bfdfb.wgsl.expected.msl | 2 +- .../textureLoad/1bfdfb.wgsl.expected.spvasm | 43 ++++++----- .../var/textureLoad/1bfdfb.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/1c562a.wgsl | 2 +- .../textureLoad/1c562a.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1c562a.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/1c562a.wgsl.expected.glsl | 6 +- .../var/textureLoad/1c562a.wgsl.expected.msl | 2 +- .../textureLoad/1c562a.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/1c562a.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/1f2016.wgsl | 2 +- .../textureLoad/1f2016.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/1f2016.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/1f2016.wgsl.expected.glsl | 6 +- .../var/textureLoad/1f2016.wgsl.expected.msl | 2 +- .../textureLoad/1f2016.wgsl.expected.spvasm | 47 ++++++------ .../var/textureLoad/1f2016.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/21d1c4.wgsl | 2 +- .../textureLoad/21d1c4.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/21d1c4.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/21d1c4.wgsl.expected.glsl | 6 +- .../var/textureLoad/21d1c4.wgsl.expected.msl | 2 +- .../textureLoad/21d1c4.wgsl.expected.spvasm | 47 ++++++------ .../var/textureLoad/21d1c4.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/223246.wgsl | 2 +- .../textureLoad/223246.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/223246.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/223246.wgsl.expected.glsl | 6 +- .../var/textureLoad/223246.wgsl.expected.msl | 2 +- .../textureLoad/223246.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/223246.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/2363be.wgsl | 2 +- .../textureLoad/2363be.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/2363be.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/2363be.wgsl.expected.glsl | 6 +- .../var/textureLoad/2363be.wgsl.expected.msl | 2 +- .../textureLoad/2363be.wgsl.expected.spvasm | 65 ++++++++-------- .../var/textureLoad/2363be.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/2d479c.wgsl | 2 +- .../textureLoad/2d479c.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/2d479c.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/2d479c.wgsl.expected.glsl | 6 +- .../var/textureLoad/2d479c.wgsl.expected.msl | 2 +- .../textureLoad/2d479c.wgsl.expected.spvasm | 46 +++++------ .../var/textureLoad/2d479c.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/2e09aa.wgsl | 2 +- .../textureLoad/2e09aa.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/2e09aa.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/2e09aa.wgsl.expected.glsl | 6 +- .../var/textureLoad/2e09aa.wgsl.expected.msl | 2 +- .../textureLoad/2e09aa.wgsl.expected.spvasm | 47 ++++++------ .../var/textureLoad/2e09aa.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/38f8ab.wgsl | 2 +- .../textureLoad/38f8ab.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/38f8ab.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/38f8ab.wgsl.expected.glsl | 6 +- .../var/textureLoad/38f8ab.wgsl.expected.msl | 2 +- .../textureLoad/38f8ab.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/38f8ab.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/3c96e8.wgsl | 2 +- .../textureLoad/3c96e8.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/3c96e8.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/3c96e8.wgsl.expected.glsl | 6 +- .../var/textureLoad/3c96e8.wgsl.expected.msl | 2 +- .../textureLoad/3c96e8.wgsl.expected.spvasm | 58 +++++++------- .../var/textureLoad/3c96e8.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/3d3fd1.wgsl | 2 +- .../textureLoad/3d3fd1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/3d3fd1.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/3d3fd1.wgsl.expected.glsl | 6 +- .../var/textureLoad/3d3fd1.wgsl.expected.msl | 2 +- .../textureLoad/3d3fd1.wgsl.expected.spvasm | 63 +++++++-------- .../var/textureLoad/3d3fd1.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/439e2a.wgsl | 2 +- .../textureLoad/439e2a.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/439e2a.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/439e2a.wgsl.expected.glsl | 6 +- .../var/textureLoad/439e2a.wgsl.expected.msl | 2 +- .../textureLoad/439e2a.wgsl.expected.spvasm | 46 +++++------ .../var/textureLoad/439e2a.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/46a93f.wgsl | 2 +- .../textureLoad/46a93f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/46a93f.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/46a93f.wgsl.expected.glsl | 6 +- .../var/textureLoad/46a93f.wgsl.expected.msl | 2 +- .../textureLoad/46a93f.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/46a93f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/47e818.wgsl | 2 +- .../textureLoad/47e818.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/47e818.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/47e818.wgsl.expected.glsl | 6 +- .../var/textureLoad/47e818.wgsl.expected.msl | 2 +- .../textureLoad/47e818.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/47e818.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/484344.wgsl | 2 +- .../textureLoad/484344.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/484344.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/484344.wgsl.expected.glsl | 6 +- .../var/textureLoad/484344.wgsl.expected.msl | 2 +- .../textureLoad/484344.wgsl.expected.spvasm | 47 ++++++------ .../var/textureLoad/484344.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/49f76f.wgsl | 2 +- .../textureLoad/49f76f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/49f76f.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/49f76f.wgsl.expected.glsl | 6 +- .../var/textureLoad/49f76f.wgsl.expected.msl | 2 +- .../textureLoad/49f76f.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/49f76f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/4acb64.wgsl | 2 +- .../textureLoad/4acb64.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/4acb64.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/4acb64.wgsl.expected.glsl | 6 +- .../var/textureLoad/4acb64.wgsl.expected.msl | 2 +- .../textureLoad/4acb64.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/4acb64.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/4db25c.wgsl | 2 +- .../textureLoad/4db25c.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/4db25c.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/4db25c.wgsl.expected.glsl | 6 +- .../var/textureLoad/4db25c.wgsl.expected.msl | 2 +- .../textureLoad/4db25c.wgsl.expected.spvasm | 49 ++++++------ .../var/textureLoad/4db25c.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/4fd803.wgsl | 2 +- .../textureLoad/4fd803.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/4fd803.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/4fd803.wgsl.expected.glsl | 6 +- .../var/textureLoad/4fd803.wgsl.expected.msl | 2 +- .../textureLoad/4fd803.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/4fd803.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/53e142.wgsl | 2 +- .../textureLoad/53e142.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/53e142.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/53e142.wgsl.expected.glsl | 6 +- .../var/textureLoad/53e142.wgsl.expected.msl | 2 +- .../textureLoad/53e142.wgsl.expected.spvasm | 62 +++++++-------- .../var/textureLoad/53e142.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/54a59b.wgsl | 2 +- .../textureLoad/54a59b.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/54a59b.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/54a59b.wgsl.expected.glsl | 6 +- .../var/textureLoad/54a59b.wgsl.expected.msl | 2 +- .../textureLoad/54a59b.wgsl.expected.spvasm | 58 +++++++------- .../var/textureLoad/54a59b.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/6154d4.wgsl | 2 +- .../textureLoad/6154d4.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6154d4.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/6154d4.wgsl.expected.glsl | 6 +- .../var/textureLoad/6154d4.wgsl.expected.msl | 2 +- .../textureLoad/6154d4.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/6154d4.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/6273b1.wgsl | 2 +- .../textureLoad/6273b1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6273b1.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/6273b1.wgsl.expected.glsl | 6 +- .../var/textureLoad/6273b1.wgsl.expected.msl | 2 +- .../textureLoad/6273b1.wgsl.expected.spvasm | 49 ++++++------ .../var/textureLoad/6273b1.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/639962.wgsl | 2 +- .../textureLoad/639962.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/639962.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/639962.wgsl.expected.glsl | 6 +- .../var/textureLoad/639962.wgsl.expected.msl | 2 +- .../textureLoad/639962.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/639962.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/656d76.wgsl | 2 +- .../textureLoad/656d76.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/656d76.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/656d76.wgsl.expected.glsl | 6 +- .../var/textureLoad/656d76.wgsl.expected.msl | 2 +- .../textureLoad/656d76.wgsl.expected.spvasm | 63 +++++++-------- .../var/textureLoad/656d76.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/66be47.wgsl | 2 +- .../textureLoad/66be47.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/66be47.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/66be47.wgsl.expected.glsl | 6 +- .../var/textureLoad/66be47.wgsl.expected.msl | 2 +- .../textureLoad/66be47.wgsl.expected.spvasm | 60 ++++++++------- .../var/textureLoad/66be47.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/6925bc.wgsl | 2 +- .../textureLoad/6925bc.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6925bc.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/6925bc.wgsl.expected.glsl | 6 +- .../var/textureLoad/6925bc.wgsl.expected.msl | 2 +- .../textureLoad/6925bc.wgsl.expected.spvasm | 48 ++++++------ .../var/textureLoad/6925bc.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/6bf4b7.wgsl | 2 +- .../textureLoad/6bf4b7.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/6bf4b7.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/6bf4b7.wgsl.expected.glsl | 6 +- .../var/textureLoad/6bf4b7.wgsl.expected.msl | 2 +- .../textureLoad/6bf4b7.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/6bf4b7.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/714471.wgsl | 2 +- .../textureLoad/714471.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/714471.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/714471.wgsl.expected.glsl | 6 +- .../var/textureLoad/714471.wgsl.expected.msl | 2 +- .../textureLoad/714471.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/714471.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/789045.wgsl | 2 +- .../textureLoad/789045.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/789045.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/789045.wgsl.expected.glsl | 6 +- .../var/textureLoad/789045.wgsl.expected.msl | 2 +- .../textureLoad/789045.wgsl.expected.spvasm | 59 +++++++------- .../var/textureLoad/789045.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/79e697.wgsl | 2 +- .../textureLoad/79e697.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/79e697.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/79e697.wgsl.expected.glsl | 6 +- .../var/textureLoad/79e697.wgsl.expected.msl | 2 +- .../textureLoad/79e697.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/79e697.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/7ab4df.wgsl | 2 +- .../textureLoad/7ab4df.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7ab4df.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/7ab4df.wgsl.expected.glsl | 6 +- .../var/textureLoad/7ab4df.wgsl.expected.msl | 2 +- .../textureLoad/7ab4df.wgsl.expected.spvasm | 65 ++++++++-------- .../var/textureLoad/7ab4df.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/7b63e0.wgsl | 2 +- .../textureLoad/7b63e0.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7b63e0.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/7b63e0.wgsl.expected.glsl | 6 +- .../var/textureLoad/7b63e0.wgsl.expected.msl | 2 +- .../textureLoad/7b63e0.wgsl.expected.spvasm | 59 +++++++------- .../var/textureLoad/7b63e0.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/7bee94.wgsl | 2 +- .../textureLoad/7bee94.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7bee94.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/7bee94.wgsl.expected.glsl | 6 +- .../var/textureLoad/7bee94.wgsl.expected.msl | 2 +- .../textureLoad/7bee94.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/7bee94.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/7c90e5.wgsl | 2 +- .../textureLoad/7c90e5.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7c90e5.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/7c90e5.wgsl.expected.glsl | 6 +- .../var/textureLoad/7c90e5.wgsl.expected.msl | 2 +- .../textureLoad/7c90e5.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/7c90e5.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/7fd822.wgsl | 2 +- .../textureLoad/7fd822.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/7fd822.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/7fd822.wgsl.expected.glsl | 6 +- .../var/textureLoad/7fd822.wgsl.expected.msl | 2 +- .../textureLoad/7fd822.wgsl.expected.spvasm | 48 ++++++------ .../var/textureLoad/7fd822.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/84dee1.wgsl | 2 +- .../textureLoad/84dee1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/84dee1.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/84dee1.wgsl.expected.glsl | 6 +- .../var/textureLoad/84dee1.wgsl.expected.msl | 2 +- .../textureLoad/84dee1.wgsl.expected.spvasm | 47 ++++++------ .../var/textureLoad/84dee1.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/8527b1.wgsl | 2 +- .../textureLoad/8527b1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/8527b1.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/8527b1.wgsl.expected.glsl | 6 +- .../var/textureLoad/8527b1.wgsl.expected.msl | 2 +- .../textureLoad/8527b1.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/8527b1.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/87be85.wgsl | 2 +- .../textureLoad/87be85.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/87be85.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/87be85.wgsl.expected.glsl | 6 +- .../var/textureLoad/87be85.wgsl.expected.msl | 2 +- .../textureLoad/87be85.wgsl.expected.spvasm | 57 +++++++------- .../var/textureLoad/87be85.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/897cf3.wgsl | 2 +- .../textureLoad/897cf3.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/897cf3.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/897cf3.wgsl.expected.glsl | 6 +- .../var/textureLoad/897cf3.wgsl.expected.msl | 2 +- .../textureLoad/897cf3.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/897cf3.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/8acf41.wgsl | 2 +- .../textureLoad/8acf41.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/8acf41.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/8acf41.wgsl.expected.glsl | 6 +- .../var/textureLoad/8acf41.wgsl.expected.msl | 2 +- .../textureLoad/8acf41.wgsl.expected.spvasm | 46 +++++------ .../var/textureLoad/8acf41.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/8ccbe3.wgsl | 2 +- .../textureLoad/8ccbe3.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/8ccbe3.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/8ccbe3.wgsl.expected.glsl | 6 +- .../var/textureLoad/8ccbe3.wgsl.expected.msl | 2 +- .../textureLoad/8ccbe3.wgsl.expected.spvasm | 48 ++++++------ .../var/textureLoad/8ccbe3.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/92eb1f.wgsl | 2 +- .../textureLoad/92eb1f.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/92eb1f.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/92eb1f.wgsl.expected.glsl | 6 +- .../var/textureLoad/92eb1f.wgsl.expected.msl | 2 +- .../textureLoad/92eb1f.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/92eb1f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/96efd5.wgsl | 2 +- .../textureLoad/96efd5.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/96efd5.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/96efd5.wgsl.expected.glsl | 6 +- .../var/textureLoad/96efd5.wgsl.expected.msl | 2 +- .../textureLoad/96efd5.wgsl.expected.spvasm | 57 +++++++------- .../var/textureLoad/96efd5.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/9885b0.wgsl | 2 +- .../textureLoad/9885b0.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9885b0.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/9885b0.wgsl.expected.glsl | 6 +- .../var/textureLoad/9885b0.wgsl.expected.msl | 2 +- .../textureLoad/9885b0.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/9885b0.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/9aa733.wgsl | 2 +- .../textureLoad/9aa733.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9aa733.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/9aa733.wgsl.expected.glsl | 6 +- .../var/textureLoad/9aa733.wgsl.expected.msl | 2 +- .../textureLoad/9aa733.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/9aa733.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/9b2667.wgsl | 2 +- .../textureLoad/9b2667.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9b2667.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/9b2667.wgsl.expected.glsl | 6 +- .../var/textureLoad/9b2667.wgsl.expected.msl | 2 +- .../textureLoad/9b2667.wgsl.expected.spvasm | 59 +++++++------- .../var/textureLoad/9b2667.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/9d70e9.wgsl | 2 +- .../textureLoad/9d70e9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9d70e9.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/9d70e9.wgsl.expected.glsl | 6 +- .../var/textureLoad/9d70e9.wgsl.expected.msl | 2 +- .../textureLoad/9d70e9.wgsl.expected.spvasm | 63 +++++++-------- .../var/textureLoad/9d70e9.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/9ed19e.wgsl | 2 +- .../textureLoad/9ed19e.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9ed19e.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/9ed19e.wgsl.expected.glsl | 6 +- .../var/textureLoad/9ed19e.wgsl.expected.msl | 2 +- .../textureLoad/9ed19e.wgsl.expected.spvasm | 49 ++++++------ .../var/textureLoad/9ed19e.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/9fbfd9.wgsl | 2 +- .../textureLoad/9fbfd9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/9fbfd9.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/9fbfd9.wgsl.expected.glsl | 6 +- .../var/textureLoad/9fbfd9.wgsl.expected.msl | 2 +- .../textureLoad/9fbfd9.wgsl.expected.spvasm | 62 +++++++-------- .../var/textureLoad/9fbfd9.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/a24be1.wgsl | 2 +- .../textureLoad/a24be1.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/a24be1.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/a24be1.wgsl.expected.glsl | 6 +- .../var/textureLoad/a24be1.wgsl.expected.msl | 2 +- .../textureLoad/a24be1.wgsl.expected.spvasm | 65 ++++++++-------- .../var/textureLoad/a24be1.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/a583c9.wgsl | 2 +- .../textureLoad/a583c9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/a583c9.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/a583c9.wgsl.expected.glsl | 6 +- .../var/textureLoad/a583c9.wgsl.expected.msl | 2 +- .../textureLoad/a583c9.wgsl.expected.spvasm | 47 ++++++------ .../var/textureLoad/a583c9.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/a9a9f5.wgsl | 2 +- .../textureLoad/a9a9f5.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/a9a9f5.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/a9a9f5.wgsl.expected.glsl | 6 +- .../var/textureLoad/a9a9f5.wgsl.expected.msl | 2 +- .../textureLoad/a9a9f5.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/a9a9f5.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/b29f71.wgsl | 2 +- .../textureLoad/b29f71.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b29f71.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/b29f71.wgsl.expected.glsl | 6 +- .../var/textureLoad/b29f71.wgsl.expected.msl | 2 +- .../textureLoad/b29f71.wgsl.expected.spvasm | 65 ++++++++-------- .../var/textureLoad/b29f71.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/b6ba5d.wgsl | 2 +- .../textureLoad/b6ba5d.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b6ba5d.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/b6ba5d.wgsl.expected.glsl | 6 +- .../var/textureLoad/b6ba5d.wgsl.expected.msl | 2 +- .../textureLoad/b6ba5d.wgsl.expected.spvasm | 60 ++++++++------- .../var/textureLoad/b6ba5d.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/b73f6b.wgsl | 2 +- .../textureLoad/b73f6b.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b73f6b.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/b73f6b.wgsl.expected.glsl | 6 +- .../var/textureLoad/b73f6b.wgsl.expected.msl | 2 +- .../textureLoad/b73f6b.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/b73f6b.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/b75d4a.wgsl | 2 +- .../textureLoad/b75d4a.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/b75d4a.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/b75d4a.wgsl.expected.glsl | 6 +- .../var/textureLoad/b75d4a.wgsl.expected.msl | 2 +- .../textureLoad/b75d4a.wgsl.expected.spvasm | 46 +++++------ .../var/textureLoad/b75d4a.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/bcbb3c.wgsl | 2 +- .../textureLoad/bcbb3c.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/bcbb3c.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/bcbb3c.wgsl.expected.glsl | 6 +- .../var/textureLoad/bcbb3c.wgsl.expected.msl | 2 +- .../textureLoad/bcbb3c.wgsl.expected.spvasm | 46 +++++------ .../var/textureLoad/bcbb3c.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/c16e00.wgsl | 2 +- .../textureLoad/c16e00.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/c16e00.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/c16e00.wgsl.expected.glsl | 6 +- .../var/textureLoad/c16e00.wgsl.expected.msl | 2 +- .../textureLoad/c16e00.wgsl.expected.spvasm | 63 +++++++-------- .../var/textureLoad/c16e00.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/c2a480.wgsl | 2 +- .../textureLoad/c2a480.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/c2a480.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/c2a480.wgsl.expected.glsl | 6 +- .../var/textureLoad/c2a480.wgsl.expected.msl | 2 +- .../textureLoad/c2a480.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/c2a480.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/c378ee.wgsl | 2 +- .../textureLoad/c378ee.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/c378ee.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/c378ee.wgsl.expected.glsl | 6 +- .../var/textureLoad/c378ee.wgsl.expected.msl | 2 +- .../textureLoad/c378ee.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/c378ee.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/cad5f2.wgsl | 2 +- .../textureLoad/cad5f2.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/cad5f2.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/cad5f2.wgsl.expected.glsl | 6 +- .../var/textureLoad/cad5f2.wgsl.expected.msl | 2 +- .../textureLoad/cad5f2.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/cad5f2.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/cb57c2.wgsl | 2 +- .../textureLoad/cb57c2.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/cb57c2.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/cb57c2.wgsl.expected.glsl | 6 +- .../var/textureLoad/cb57c2.wgsl.expected.msl | 2 +- .../textureLoad/cb57c2.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/cb57c2.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/e35f72.wgsl | 2 +- .../textureLoad/e35f72.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/e35f72.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/e35f72.wgsl.expected.glsl | 6 +- .../var/textureLoad/e35f72.wgsl.expected.msl | 2 +- .../textureLoad/e35f72.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/e35f72.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/e3d2cc.wgsl | 2 +- .../textureLoad/e3d2cc.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/e3d2cc.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/e3d2cc.wgsl.expected.glsl | 6 +- .../var/textureLoad/e3d2cc.wgsl.expected.msl | 2 +- .../textureLoad/e3d2cc.wgsl.expected.spvasm | 51 +++++++------ .../var/textureLoad/e3d2cc.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/ebfb92.wgsl | 2 +- .../textureLoad/ebfb92.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/ebfb92.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/ebfb92.wgsl.expected.glsl | 6 +- .../var/textureLoad/ebfb92.wgsl.expected.msl | 2 +- .../textureLoad/ebfb92.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/ebfb92.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/f0abad.wgsl | 2 +- .../textureLoad/f0abad.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/f0abad.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/f0abad.wgsl.expected.glsl | 6 +- .../var/textureLoad/f0abad.wgsl.expected.msl | 2 +- .../textureLoad/f0abad.wgsl.expected.spvasm | 46 +++++------ .../var/textureLoad/f0abad.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/f348d9.wgsl | 2 +- .../textureLoad/f348d9.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/f348d9.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/f348d9.wgsl.expected.glsl | 6 +- .../var/textureLoad/f348d9.wgsl.expected.msl | 2 +- .../textureLoad/f348d9.wgsl.expected.spvasm | 59 +++++++------- .../var/textureLoad/f348d9.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/f85291.wgsl | 2 +- .../textureLoad/f85291.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/f85291.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/f85291.wgsl.expected.glsl | 6 +- .../var/textureLoad/f85291.wgsl.expected.msl | 2 +- .../textureLoad/f85291.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/f85291.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/fcd23d.wgsl | 2 +- .../textureLoad/fcd23d.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/fcd23d.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/fcd23d.wgsl.expected.glsl | 6 +- .../var/textureLoad/fcd23d.wgsl.expected.msl | 2 +- .../textureLoad/fcd23d.wgsl.expected.spvasm | 48 ++++++------ .../var/textureLoad/fcd23d.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/fe0565.wgsl | 2 +- .../textureLoad/fe0565.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/fe0565.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/fe0565.wgsl.expected.glsl | 6 +- .../var/textureLoad/fe0565.wgsl.expected.msl | 2 +- .../textureLoad/fe0565.wgsl.expected.spvasm | 50 ++++++------ .../var/textureLoad/fe0565.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureLoad/ff1119.wgsl | 2 +- .../textureLoad/ff1119.wgsl.expected.dxc.hlsl | 2 +- .../textureLoad/ff1119.wgsl.expected.fxc.hlsl | 2 +- .../var/textureLoad/ff1119.wgsl.expected.glsl | 6 +- .../var/textureLoad/ff1119.wgsl.expected.msl | 2 +- .../textureLoad/ff1119.wgsl.expected.spvasm | 61 +++++++-------- .../var/textureLoad/ff1119.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/0dff6c.wgsl | 4 +- .../0dff6c.wgsl.expected.dxc.hlsl | 4 +- .../0dff6c.wgsl.expected.fxc.hlsl | 4 +- .../textureSample/0dff6c.wgsl.expected.glsl | 4 +- .../textureSample/0dff6c.wgsl.expected.msl | 4 +- .../textureSample/0dff6c.wgsl.expected.spvasm | 37 ++++----- .../textureSample/0dff6c.wgsl.expected.wgsl | 4 +- .../gen/var/textureSample/17e988.wgsl | 4 +- .../17e988.wgsl.expected.dxc.hlsl | 4 +- .../17e988.wgsl.expected.fxc.hlsl | 4 +- .../textureSample/17e988.wgsl.expected.glsl | 4 +- .../textureSample/17e988.wgsl.expected.msl | 4 +- .../textureSample/17e988.wgsl.expected.spvasm | 48 ++++++------ .../textureSample/17e988.wgsl.expected.wgsl | 4 +- .../gen/var/textureSample/193203.wgsl | 4 +- .../193203.wgsl.expected.dxc.hlsl | 4 +- .../193203.wgsl.expected.fxc.hlsl | 4 +- .../textureSample/193203.wgsl.expected.glsl | 4 +- .../textureSample/193203.wgsl.expected.msl | 4 +- .../textureSample/193203.wgsl.expected.spvasm | 49 ++++++------ .../textureSample/193203.wgsl.expected.wgsl | 4 +- .../gen/var/textureSample/1a4e1b.wgsl | 2 +- .../1a4e1b.wgsl.expected.dxc.hlsl | 2 +- .../1a4e1b.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/1a4e1b.wgsl.expected.glsl | 2 +- .../textureSample/1a4e1b.wgsl.expected.msl | 2 +- .../textureSample/1a4e1b.wgsl.expected.spvasm | 48 ++++++------ .../textureSample/1a4e1b.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/2149ec.wgsl | 4 +- .../2149ec.wgsl.expected.dxc.hlsl | 4 +- .../2149ec.wgsl.expected.fxc.hlsl | 4 +- .../textureSample/2149ec.wgsl.expected.glsl | 4 +- .../textureSample/2149ec.wgsl.expected.msl | 4 +- .../textureSample/2149ec.wgsl.expected.spvasm | 35 +++++---- .../textureSample/2149ec.wgsl.expected.wgsl | 4 +- .../gen/var/textureSample/38bbb9.wgsl | 2 +- .../38bbb9.wgsl.expected.dxc.hlsl | 2 +- .../38bbb9.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/38bbb9.wgsl.expected.glsl | 2 +- .../textureSample/38bbb9.wgsl.expected.msl | 2 +- .../textureSample/38bbb9.wgsl.expected.spvasm | 34 +++++---- .../textureSample/38bbb9.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/3b50bd.wgsl | 2 +- .../3b50bd.wgsl.expected.dxc.hlsl | 2 +- .../3b50bd.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/3b50bd.wgsl.expected.glsl | 2 +- .../textureSample/3b50bd.wgsl.expected.msl | 2 +- .../textureSample/3b50bd.wgsl.expected.spvasm | 32 ++++---- .../textureSample/3b50bd.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/4703d0.wgsl | 4 +- .../4703d0.wgsl.expected.dxc.hlsl | 4 +- .../4703d0.wgsl.expected.fxc.hlsl | 4 +- .../textureSample/4703d0.wgsl.expected.msl | 4 +- .../textureSample/4703d0.wgsl.expected.spvasm | 51 +++++++------ .../textureSample/4703d0.wgsl.expected.wgsl | 4 +- .../gen/var/textureSample/4dd1bf.wgsl | 2 +- .../4dd1bf.wgsl.expected.dxc.hlsl | 2 +- .../4dd1bf.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/4dd1bf.wgsl.expected.msl | 2 +- .../textureSample/4dd1bf.wgsl.expected.spvasm | 48 ++++++------ .../textureSample/4dd1bf.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/51b514.wgsl | 2 +- .../51b514.wgsl.expected.dxc.hlsl | 2 +- .../51b514.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/51b514.wgsl.expected.glsl | 2 +- .../textureSample/51b514.wgsl.expected.msl | 2 +- .../textureSample/51b514.wgsl.expected.spvasm | 32 ++++---- .../textureSample/51b514.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/60bf45.wgsl | 4 +- .../60bf45.wgsl.expected.dxc.hlsl | 4 +- .../60bf45.wgsl.expected.fxc.hlsl | 4 +- .../textureSample/60bf45.wgsl.expected.msl | 4 +- .../textureSample/60bf45.wgsl.expected.spvasm | 50 ++++++------ .../textureSample/60bf45.wgsl.expected.wgsl | 4 +- .../gen/var/textureSample/6717ca.wgsl | 2 +- .../6717ca.wgsl.expected.dxc.hlsl | 2 +- .../6717ca.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/6717ca.wgsl.expected.glsl | 2 +- .../textureSample/6717ca.wgsl.expected.msl | 2 +- .../textureSample/6717ca.wgsl.expected.spvasm | 46 +++++------ .../textureSample/6717ca.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/7e9ffd.wgsl | 2 +- .../7e9ffd.wgsl.expected.dxc.hlsl | 2 +- .../7e9ffd.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/7e9ffd.wgsl.expected.glsl | 2 +- .../textureSample/7e9ffd.wgsl.expected.msl | 2 +- .../textureSample/7e9ffd.wgsl.expected.spvasm | 48 ++++++------ .../textureSample/7e9ffd.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/7fd8cb.wgsl | 2 +- .../7fd8cb.wgsl.expected.dxc.hlsl | 2 +- .../7fd8cb.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/7fd8cb.wgsl.expected.msl | 2 +- .../textureSample/7fd8cb.wgsl.expected.spvasm | 50 ++++++------ .../textureSample/7fd8cb.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/85c4ba.wgsl | 4 +- .../85c4ba.wgsl.expected.dxc.hlsl | 4 +- .../85c4ba.wgsl.expected.fxc.hlsl | 4 +- .../textureSample/85c4ba.wgsl.expected.glsl | 4 +- .../textureSample/85c4ba.wgsl.expected.msl | 4 +- .../textureSample/85c4ba.wgsl.expected.spvasm | 35 +++++---- .../textureSample/85c4ba.wgsl.expected.wgsl | 4 +- .../gen/var/textureSample/bc7477.wgsl | 2 +- .../bc7477.wgsl.expected.dxc.hlsl | 2 +- .../bc7477.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/bc7477.wgsl.expected.msl | 2 +- .../textureSample/bc7477.wgsl.expected.spvasm | 48 ++++++------ .../textureSample/bc7477.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/c2f4e8.wgsl | 2 +- .../c2f4e8.wgsl.expected.dxc.hlsl | 2 +- .../c2f4e8.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/c2f4e8.wgsl.expected.msl | 2 +- .../textureSample/c2f4e8.wgsl.expected.spvasm | 50 ++++++------ .../textureSample/c2f4e8.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/d6b281.wgsl | 2 +- .../d6b281.wgsl.expected.dxc.hlsl | 2 +- .../d6b281.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/d6b281.wgsl.expected.glsl | 2 +- .../textureSample/d6b281.wgsl.expected.msl | 2 +- .../textureSample/d6b281.wgsl.expected.spvasm | 46 +++++------ .../textureSample/d6b281.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/e53267.wgsl | 2 +- .../e53267.wgsl.expected.dxc.hlsl | 2 +- .../e53267.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/e53267.wgsl.expected.glsl | 2 +- .../textureSample/e53267.wgsl.expected.msl | 2 +- .../textureSample/e53267.wgsl.expected.spvasm | 32 ++++---- .../textureSample/e53267.wgsl.expected.wgsl | 2 +- .../gen/var/textureSample/ea7030.wgsl | 2 +- .../ea7030.wgsl.expected.dxc.hlsl | 2 +- .../ea7030.wgsl.expected.fxc.hlsl | 2 +- .../textureSample/ea7030.wgsl.expected.glsl | 2 +- .../textureSample/ea7030.wgsl.expected.msl | 2 +- .../textureSample/ea7030.wgsl.expected.spvasm | 34 +++++---- .../textureSample/ea7030.wgsl.expected.wgsl | 2 +- .../textureSampleBaseClampToEdge/7c04e6.wgsl | 2 +- .../7c04e6.wgsl.expected.dxc.hlsl | 2 +- .../7c04e6.wgsl.expected.fxc.hlsl | 2 +- .../7c04e6.wgsl.expected.glsl | 6 +- .../7c04e6.wgsl.expected.msl | 2 +- .../7c04e6.wgsl.expected.spvasm | 43 ++++++----- .../7c04e6.wgsl.expected.wgsl | 2 +- .../textureSampleBaseClampToEdge/9ca02c.wgsl | 2 +- .../9ca02c.wgsl.expected.dxc.hlsl | 2 +- .../9ca02c.wgsl.expected.fxc.hlsl | 2 +- .../9ca02c.wgsl.expected.glsl | 6 +- .../9ca02c.wgsl.expected.msl | 2 +- .../9ca02c.wgsl.expected.spvasm | 37 ++++----- .../9ca02c.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleBias/1c707e.wgsl | 2 +- .../1c707e.wgsl.expected.dxc.hlsl | 2 +- .../1c707e.wgsl.expected.fxc.hlsl | 2 +- .../1c707e.wgsl.expected.glsl | 2 +- .../1c707e.wgsl.expected.msl | 2 +- .../1c707e.wgsl.expected.spvasm | 53 ++++++------- .../1c707e.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleBias/53b9f7.wgsl | 2 +- .../53b9f7.wgsl.expected.dxc.hlsl | 2 +- .../53b9f7.wgsl.expected.fxc.hlsl | 2 +- .../53b9f7.wgsl.expected.glsl | 2 +- .../53b9f7.wgsl.expected.msl | 2 +- .../53b9f7.wgsl.expected.spvasm | 39 +++++----- .../53b9f7.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleBias/594824.wgsl | 4 +- .../594824.wgsl.expected.dxc.hlsl | 4 +- .../594824.wgsl.expected.fxc.hlsl | 4 +- .../594824.wgsl.expected.glsl | 4 +- .../594824.wgsl.expected.msl | 4 +- .../594824.wgsl.expected.spvasm | 42 +++++----- .../594824.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleBias/6a9113.wgsl | 2 +- .../6a9113.wgsl.expected.dxc.hlsl | 2 +- .../6a9113.wgsl.expected.fxc.hlsl | 2 +- .../6a9113.wgsl.expected.glsl | 2 +- .../6a9113.wgsl.expected.msl | 2 +- .../6a9113.wgsl.expected.spvasm | 39 +++++----- .../6a9113.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleBias/80e579.wgsl | 2 +- .../80e579.wgsl.expected.dxc.hlsl | 2 +- .../80e579.wgsl.expected.fxc.hlsl | 2 +- .../80e579.wgsl.expected.glsl | 2 +- .../80e579.wgsl.expected.msl | 2 +- .../80e579.wgsl.expected.spvasm | 53 ++++++------- .../80e579.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleBias/87915c.wgsl | 4 +- .../87915c.wgsl.expected.dxc.hlsl | 4 +- .../87915c.wgsl.expected.fxc.hlsl | 4 +- .../87915c.wgsl.expected.glsl | 4 +- .../87915c.wgsl.expected.msl | 4 +- .../87915c.wgsl.expected.spvasm | 56 +++++++------- .../87915c.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleBias/9dbb51.wgsl | 4 +- .../9dbb51.wgsl.expected.dxc.hlsl | 4 +- .../9dbb51.wgsl.expected.fxc.hlsl | 4 +- .../9dbb51.wgsl.expected.glsl | 4 +- .../9dbb51.wgsl.expected.msl | 4 +- .../9dbb51.wgsl.expected.spvasm | 55 +++++++------- .../9dbb51.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleBias/a161cf.wgsl | 4 +- .../a161cf.wgsl.expected.dxc.hlsl | 4 +- .../a161cf.wgsl.expected.fxc.hlsl | 4 +- .../a161cf.wgsl.expected.glsl | 4 +- .../a161cf.wgsl.expected.msl | 4 +- .../a161cf.wgsl.expected.spvasm | 42 +++++----- .../a161cf.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleBias/c6953d.wgsl | 2 +- .../c6953d.wgsl.expected.dxc.hlsl | 2 +- .../c6953d.wgsl.expected.fxc.hlsl | 2 +- .../c6953d.wgsl.expected.msl | 2 +- .../c6953d.wgsl.expected.spvasm | 55 +++++++------- .../c6953d.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleBias/d3fa1b.wgsl | 2 +- .../d3fa1b.wgsl.expected.dxc.hlsl | 2 +- .../d3fa1b.wgsl.expected.fxc.hlsl | 2 +- .../d3fa1b.wgsl.expected.glsl | 2 +- .../d3fa1b.wgsl.expected.msl | 2 +- .../d3fa1b.wgsl.expected.spvasm | 39 +++++----- .../d3fa1b.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleBias/eed7c4.wgsl | 2 +- .../eed7c4.wgsl.expected.dxc.hlsl | 2 +- .../eed7c4.wgsl.expected.fxc.hlsl | 2 +- .../eed7c4.wgsl.expected.msl | 2 +- .../eed7c4.wgsl.expected.spvasm | 55 +++++++------- .../eed7c4.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleCompare/1912e5.wgsl | 2 +- .../1912e5.wgsl.expected.dxc.hlsl | 2 +- .../1912e5.wgsl.expected.fxc.hlsl | 2 +- .../1912e5.wgsl.expected.msl | 2 +- .../1912e5.wgsl.expected.spvasm | 53 ++++++------- .../1912e5.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleCompare/3a5923.wgsl | 2 +- .../3a5923.wgsl.expected.dxc.hlsl | 2 +- .../3a5923.wgsl.expected.fxc.hlsl | 2 +- .../3a5923.wgsl.expected.glsl | 2 +- .../3a5923.wgsl.expected.msl | 2 +- .../3a5923.wgsl.expected.spvasm | 37 ++++----- .../3a5923.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleCompare/63fb83.wgsl | 2 +- .../63fb83.wgsl.expected.dxc.hlsl | 2 +- .../63fb83.wgsl.expected.fxc.hlsl | 2 +- .../63fb83.wgsl.expected.glsl | 2 +- .../63fb83.wgsl.expected.msl | 2 +- .../63fb83.wgsl.expected.spvasm | 37 ++++----- .../63fb83.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleCompare/7b5025.wgsl | 4 +- .../7b5025.wgsl.expected.dxc.hlsl | 4 +- .../7b5025.wgsl.expected.fxc.hlsl | 4 +- .../7b5025.wgsl.expected.msl | 4 +- .../7b5025.wgsl.expected.spvasm | 54 ++++++------- .../7b5025.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleCompare/90ae56.wgsl | 2 +- .../90ae56.wgsl.expected.dxc.hlsl | 2 +- .../90ae56.wgsl.expected.fxc.hlsl | 2 +- .../90ae56.wgsl.expected.glsl | 2 +- .../90ae56.wgsl.expected.msl | 2 +- .../90ae56.wgsl.expected.spvasm | 51 +++++++------ .../90ae56.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleCompare/a3ca7e.wgsl | 2 +- .../a3ca7e.wgsl.expected.dxc.hlsl | 2 +- .../a3ca7e.wgsl.expected.fxc.hlsl | 2 +- .../a3ca7e.wgsl.expected.msl | 2 +- .../a3ca7e.wgsl.expected.spvasm | 53 ++++++------- .../a3ca7e.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleCompare/af1051.wgsl | 4 +- .../af1051.wgsl.expected.dxc.hlsl | 4 +- .../af1051.wgsl.expected.fxc.hlsl | 4 +- .../af1051.wgsl.expected.msl | 4 +- .../af1051.wgsl.expected.spvasm | 53 ++++++------- .../af1051.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleCompare/dd431d.wgsl | 2 +- .../dd431d.wgsl.expected.dxc.hlsl | 2 +- .../dd431d.wgsl.expected.fxc.hlsl | 2 +- .../dd431d.wgsl.expected.glsl | 2 +- .../dd431d.wgsl.expected.msl | 2 +- .../dd431d.wgsl.expected.spvasm | 51 +++++++------ .../dd431d.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleCompare/dec064.wgsl | 4 +- .../dec064.wgsl.expected.dxc.hlsl | 4 +- .../dec064.wgsl.expected.fxc.hlsl | 4 +- .../dec064.wgsl.expected.glsl | 4 +- .../dec064.wgsl.expected.msl | 4 +- .../dec064.wgsl.expected.spvasm | 40 +++++----- .../dec064.wgsl.expected.wgsl | 4 +- .../var/textureSampleCompareLevel/1116ed.wgsl | 2 +- .../1116ed.wgsl.expected.dxc.hlsl | 2 +- .../1116ed.wgsl.expected.fxc.hlsl | 2 +- .../1116ed.wgsl.expected.glsl | 6 +- .../1116ed.wgsl.expected.msl | 2 +- .../1116ed.wgsl.expected.spvasm | 63 +++++++-------- .../1116ed.wgsl.expected.wgsl | 2 +- .../var/textureSampleCompareLevel/1568e3.wgsl | 2 +- .../1568e3.wgsl.expected.dxc.hlsl | 2 +- .../1568e3.wgsl.expected.fxc.hlsl | 2 +- .../1568e3.wgsl.expected.glsl | 6 +- .../1568e3.wgsl.expected.msl | 2 +- .../1568e3.wgsl.expected.spvasm | 49 ++++++------ .../1568e3.wgsl.expected.wgsl | 2 +- .../var/textureSampleCompareLevel/2ad2b1.wgsl | 2 +- .../2ad2b1.wgsl.expected.dxc.hlsl | 2 +- .../2ad2b1.wgsl.expected.fxc.hlsl | 2 +- .../2ad2b1.wgsl.expected.glsl | 6 +- .../2ad2b1.wgsl.expected.msl | 2 +- .../2ad2b1.wgsl.expected.spvasm | 49 ++++++------ .../2ad2b1.wgsl.expected.wgsl | 2 +- .../var/textureSampleCompareLevel/4cf3a2.wgsl | 2 +- .../4cf3a2.wgsl.expected.dxc.hlsl | 2 +- .../4cf3a2.wgsl.expected.fxc.hlsl | 2 +- .../4cf3a2.wgsl.expected.msl | 2 +- .../4cf3a2.wgsl.expected.spvasm | 65 ++++++++-------- .../4cf3a2.wgsl.expected.wgsl | 2 +- .../var/textureSampleCompareLevel/7dc3c0.wgsl | 2 +- .../7dc3c0.wgsl.expected.dxc.hlsl | 2 +- .../7dc3c0.wgsl.expected.fxc.hlsl | 2 +- .../7dc3c0.wgsl.expected.glsl | 6 +- .../7dc3c0.wgsl.expected.msl | 2 +- .../7dc3c0.wgsl.expected.spvasm | 63 +++++++-------- .../7dc3c0.wgsl.expected.wgsl | 2 +- .../var/textureSampleCompareLevel/7f2b9a.wgsl | 4 +- .../7f2b9a.wgsl.expected.dxc.hlsl | 4 +- .../7f2b9a.wgsl.expected.fxc.hlsl | 4 +- .../7f2b9a.wgsl.expected.glsl | 12 +-- .../7f2b9a.wgsl.expected.msl | 4 +- .../7f2b9a.wgsl.expected.spvasm | 52 +++++++------ .../7f2b9a.wgsl.expected.wgsl | 4 +- .../var/textureSampleCompareLevel/958c87.wgsl | 2 +- .../958c87.wgsl.expected.dxc.hlsl | 2 +- .../958c87.wgsl.expected.fxc.hlsl | 2 +- .../958c87.wgsl.expected.msl | 2 +- .../958c87.wgsl.expected.spvasm | 65 ++++++++-------- .../958c87.wgsl.expected.wgsl | 2 +- .../var/textureSampleCompareLevel/b6e47c.wgsl | 4 +- .../b6e47c.wgsl.expected.dxc.hlsl | 4 +- .../b6e47c.wgsl.expected.fxc.hlsl | 4 +- .../b6e47c.wgsl.expected.msl | 4 +- .../b6e47c.wgsl.expected.spvasm | 65 ++++++++-------- .../b6e47c.wgsl.expected.wgsl | 4 +- .../var/textureSampleCompareLevel/bcb3dd.wgsl | 4 +- .../bcb3dd.wgsl.expected.dxc.hlsl | 4 +- .../bcb3dd.wgsl.expected.fxc.hlsl | 4 +- .../bcb3dd.wgsl.expected.msl | 4 +- .../bcb3dd.wgsl.expected.spvasm | 66 ++++++++-------- .../bcb3dd.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleGrad/21402b.wgsl | 6 +- .../21402b.wgsl.expected.dxc.hlsl | 6 +- .../21402b.wgsl.expected.fxc.hlsl | 6 +- .../21402b.wgsl.expected.glsl | 18 ++--- .../21402b.wgsl.expected.msl | 6 +- .../21402b.wgsl.expected.spvasm | 61 +++++++-------- .../21402b.wgsl.expected.wgsl | 6 +- .../gen/var/textureSampleGrad/2ecd8f.wgsl | 6 +- .../2ecd8f.wgsl.expected.dxc.hlsl | 6 +- .../2ecd8f.wgsl.expected.fxc.hlsl | 6 +- .../2ecd8f.wgsl.expected.glsl | 18 ++--- .../2ecd8f.wgsl.expected.msl | 6 +- .../2ecd8f.wgsl.expected.spvasm | 73 +++++++++--------- .../2ecd8f.wgsl.expected.wgsl | 6 +- .../gen/var/textureSampleGrad/521263.wgsl | 6 +- .../521263.wgsl.expected.dxc.hlsl | 6 +- .../521263.wgsl.expected.fxc.hlsl | 6 +- .../521263.wgsl.expected.glsl | 18 ++--- .../521263.wgsl.expected.msl | 6 +- .../521263.wgsl.expected.spvasm | 61 +++++++-------- .../521263.wgsl.expected.wgsl | 6 +- .../gen/var/textureSampleGrad/5312f4.wgsl | 6 +- .../5312f4.wgsl.expected.dxc.hlsl | 6 +- .../5312f4.wgsl.expected.fxc.hlsl | 6 +- .../5312f4.wgsl.expected.glsl | 18 ++--- .../5312f4.wgsl.expected.msl | 6 +- .../5312f4.wgsl.expected.spvasm | 61 +++++++-------- .../5312f4.wgsl.expected.wgsl | 6 +- .../gen/var/textureSampleGrad/5884dd.wgsl | 8 +- .../5884dd.wgsl.expected.dxc.hlsl | 8 +- .../5884dd.wgsl.expected.fxc.hlsl | 8 +- .../5884dd.wgsl.expected.glsl | 24 +++--- .../5884dd.wgsl.expected.msl | 8 +- .../5884dd.wgsl.expected.spvasm | 62 +++++++-------- .../5884dd.wgsl.expected.wgsl | 8 +- .../gen/var/textureSampleGrad/7cd6de.wgsl | 8 +- .../7cd6de.wgsl.expected.dxc.hlsl | 8 +- .../7cd6de.wgsl.expected.fxc.hlsl | 8 +- .../7cd6de.wgsl.expected.glsl | 24 +++--- .../7cd6de.wgsl.expected.msl | 8 +- .../7cd6de.wgsl.expected.spvasm | 76 ++++++++++--------- .../7cd6de.wgsl.expected.wgsl | 8 +- .../gen/var/textureSampleGrad/a09131.wgsl | 6 +- .../a09131.wgsl.expected.dxc.hlsl | 6 +- .../a09131.wgsl.expected.fxc.hlsl | 6 +- .../a09131.wgsl.expected.glsl | 18 ++--- .../a09131.wgsl.expected.msl | 6 +- .../a09131.wgsl.expected.spvasm | 73 +++++++++--------- .../a09131.wgsl.expected.wgsl | 6 +- .../gen/var/textureSampleGrad/bbb58f.wgsl | 6 +- .../bbb58f.wgsl.expected.dxc.hlsl | 6 +- .../bbb58f.wgsl.expected.fxc.hlsl | 6 +- .../bbb58f.wgsl.expected.msl | 6 +- .../bbb58f.wgsl.expected.spvasm | 75 +++++++++--------- .../bbb58f.wgsl.expected.wgsl | 6 +- .../gen/var/textureSampleGrad/d4e3c5.wgsl | 8 +- .../d4e3c5.wgsl.expected.dxc.hlsl | 8 +- .../d4e3c5.wgsl.expected.fxc.hlsl | 8 +- .../d4e3c5.wgsl.expected.glsl | 24 +++--- .../d4e3c5.wgsl.expected.msl | 8 +- .../d4e3c5.wgsl.expected.spvasm | 62 +++++++-------- .../d4e3c5.wgsl.expected.wgsl | 8 +- .../gen/var/textureSampleGrad/d65515.wgsl | 8 +- .../d65515.wgsl.expected.dxc.hlsl | 8 +- .../d65515.wgsl.expected.fxc.hlsl | 8 +- .../d65515.wgsl.expected.glsl | 24 +++--- .../d65515.wgsl.expected.msl | 8 +- .../d65515.wgsl.expected.spvasm | 75 +++++++++--------- .../d65515.wgsl.expected.wgsl | 8 +- .../gen/var/textureSampleGrad/e383db.wgsl | 6 +- .../e383db.wgsl.expected.dxc.hlsl | 6 +- .../e383db.wgsl.expected.fxc.hlsl | 6 +- .../e383db.wgsl.expected.msl | 6 +- .../e383db.wgsl.expected.spvasm | 75 +++++++++--------- .../e383db.wgsl.expected.wgsl | 6 +- .../gen/var/textureSampleLevel/02be59.wgsl | 2 +- .../02be59.wgsl.expected.dxc.hlsl | 2 +- .../02be59.wgsl.expected.fxc.hlsl | 2 +- .../02be59.wgsl.expected.glsl | 6 +- .../02be59.wgsl.expected.msl | 2 +- .../02be59.wgsl.expected.spvasm | 57 +++++++------- .../02be59.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/0b0a1b.wgsl | 4 +- .../0b0a1b.wgsl.expected.dxc.hlsl | 4 +- .../0b0a1b.wgsl.expected.fxc.hlsl | 4 +- .../0b0a1b.wgsl.expected.glsl | 12 +-- .../0b0a1b.wgsl.expected.msl | 4 +- .../0b0a1b.wgsl.expected.spvasm | 52 +++++++------ .../0b0a1b.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/0bdd9a.wgsl | 2 +- .../0bdd9a.wgsl.expected.dxc.hlsl | 2 +- .../0bdd9a.wgsl.expected.fxc.hlsl | 2 +- .../0bdd9a.wgsl.expected.msl | 2 +- .../0bdd9a.wgsl.expected.spvasm | 65 ++++++++-------- .../0bdd9a.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/1b0291.wgsl | 2 +- .../1b0291.wgsl.expected.dxc.hlsl | 2 +- .../1b0291.wgsl.expected.fxc.hlsl | 2 +- .../1b0291.wgsl.expected.msl | 2 +- .../1b0291.wgsl.expected.spvasm | 57 +++++++------- .../1b0291.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/1bf73e.wgsl | 2 +- .../1bf73e.wgsl.expected.dxc.hlsl | 2 +- .../1bf73e.wgsl.expected.fxc.hlsl | 2 +- .../1bf73e.wgsl.expected.msl | 2 +- .../1bf73e.wgsl.expected.spvasm | 69 ++++++++--------- .../1bf73e.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/265cc7.wgsl | 2 +- .../265cc7.wgsl.expected.dxc.hlsl | 2 +- .../265cc7.wgsl.expected.fxc.hlsl | 2 +- .../265cc7.wgsl.expected.glsl | 6 +- .../265cc7.wgsl.expected.msl | 2 +- .../265cc7.wgsl.expected.spvasm | 63 +++++++-------- .../265cc7.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/2974eb.wgsl | 2 +- .../2974eb.wgsl.expected.dxc.hlsl | 2 +- .../2974eb.wgsl.expected.fxc.hlsl | 2 +- .../2974eb.wgsl.expected.msl | 2 +- .../2974eb.wgsl.expected.spvasm | 71 ++++++++--------- .../2974eb.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/302be4.wgsl | 2 +- .../302be4.wgsl.expected.dxc.hlsl | 2 +- .../302be4.wgsl.expected.fxc.hlsl | 2 +- .../302be4.wgsl.expected.glsl | 6 +- .../302be4.wgsl.expected.msl | 2 +- .../302be4.wgsl.expected.spvasm | 63 +++++++-------- .../302be4.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/36780e.wgsl | 4 +- .../36780e.wgsl.expected.dxc.hlsl | 4 +- .../36780e.wgsl.expected.fxc.hlsl | 4 +- .../36780e.wgsl.expected.msl | 4 +- .../36780e.wgsl.expected.spvasm | 71 ++++++++--------- .../36780e.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/36f0d3.wgsl | 4 +- .../36f0d3.wgsl.expected.dxc.hlsl | 4 +- .../36f0d3.wgsl.expected.fxc.hlsl | 4 +- .../36f0d3.wgsl.expected.msl | 4 +- .../36f0d3.wgsl.expected.spvasm | 73 +++++++++--------- .../36f0d3.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/3c3442.wgsl | 2 +- .../3c3442.wgsl.expected.dxc.hlsl | 2 +- .../3c3442.wgsl.expected.fxc.hlsl | 2 +- .../3c3442.wgsl.expected.msl | 2 +- .../3c3442.wgsl.expected.spvasm | 71 ++++++++--------- .../3c3442.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/615583.wgsl | 2 +- .../615583.wgsl.expected.dxc.hlsl | 2 +- .../615583.wgsl.expected.fxc.hlsl | 2 +- .../615583.wgsl.expected.msl | 2 +- .../615583.wgsl.expected.spvasm | 69 ++++++++--------- .../615583.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/73e892.wgsl | 2 +- .../73e892.wgsl.expected.dxc.hlsl | 2 +- .../73e892.wgsl.expected.fxc.hlsl | 2 +- .../73e892.wgsl.expected.glsl | 6 +- .../73e892.wgsl.expected.msl | 2 +- .../73e892.wgsl.expected.spvasm | 57 +++++++------- .../73e892.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/749baf.wgsl | 4 +- .../749baf.wgsl.expected.dxc.hlsl | 4 +- .../749baf.wgsl.expected.fxc.hlsl | 4 +- .../749baf.wgsl.expected.glsl | 12 +-- .../749baf.wgsl.expected.msl | 4 +- .../749baf.wgsl.expected.spvasm | 59 +++++++------- .../749baf.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/941a53.wgsl | 2 +- .../941a53.wgsl.expected.dxc.hlsl | 2 +- .../941a53.wgsl.expected.fxc.hlsl | 2 +- .../941a53.wgsl.expected.msl | 2 +- .../941a53.wgsl.expected.spvasm | 71 ++++++++--------- .../941a53.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/979816.wgsl | 2 +- .../979816.wgsl.expected.dxc.hlsl | 2 +- .../979816.wgsl.expected.fxc.hlsl | 2 +- .../979816.wgsl.expected.glsl | 6 +- .../979816.wgsl.expected.msl | 2 +- .../979816.wgsl.expected.spvasm | 45 +++++------ .../979816.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/a12142.wgsl | 2 +- .../a12142.wgsl.expected.dxc.hlsl | 2 +- .../a12142.wgsl.expected.fxc.hlsl | 2 +- .../a12142.wgsl.expected.msl | 2 +- .../a12142.wgsl.expected.spvasm | 73 +++++++++--------- .../a12142.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/aab3b9.wgsl | 2 +- .../aab3b9.wgsl.expected.dxc.hlsl | 2 +- .../aab3b9.wgsl.expected.fxc.hlsl | 2 +- .../aab3b9.wgsl.expected.msl | 2 +- .../aab3b9.wgsl.expected.spvasm | 65 ++++++++-------- .../aab3b9.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/abfcc0.wgsl | 2 +- .../abfcc0.wgsl.expected.dxc.hlsl | 2 +- .../abfcc0.wgsl.expected.fxc.hlsl | 2 +- .../abfcc0.wgsl.expected.glsl | 6 +- .../abfcc0.wgsl.expected.msl | 2 +- .../abfcc0.wgsl.expected.spvasm | 49 ++++++------ .../abfcc0.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/ae5e39.wgsl | 2 +- .../ae5e39.wgsl.expected.dxc.hlsl | 2 +- .../ae5e39.wgsl.expected.fxc.hlsl | 2 +- .../ae5e39.wgsl.expected.msl | 2 +- .../ae5e39.wgsl.expected.spvasm | 71 ++++++++--------- .../ae5e39.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/ae92a2.wgsl | 2 +- .../ae92a2.wgsl.expected.dxc.hlsl | 2 +- .../ae92a2.wgsl.expected.fxc.hlsl | 2 +- .../ae92a2.wgsl.expected.msl | 2 +- .../ae92a2.wgsl.expected.spvasm | 57 +++++++------- .../ae92a2.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/b7c55c.wgsl | 4 +- .../b7c55c.wgsl.expected.dxc.hlsl | 4 +- .../b7c55c.wgsl.expected.fxc.hlsl | 4 +- .../b7c55c.wgsl.expected.glsl | 12 +-- .../b7c55c.wgsl.expected.msl | 4 +- .../b7c55c.wgsl.expected.spvasm | 65 ++++++++-------- .../b7c55c.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/c32df7.wgsl | 2 +- .../c32df7.wgsl.expected.dxc.hlsl | 2 +- .../c32df7.wgsl.expected.fxc.hlsl | 2 +- .../c32df7.wgsl.expected.glsl | 6 +- .../c32df7.wgsl.expected.msl | 2 +- .../c32df7.wgsl.expected.spvasm | 49 ++++++------ .../c32df7.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/c6aca6.wgsl | 2 +- .../c6aca6.wgsl.expected.dxc.hlsl | 2 +- .../c6aca6.wgsl.expected.fxc.hlsl | 2 +- .../c6aca6.wgsl.expected.glsl | 6 +- .../c6aca6.wgsl.expected.msl | 2 +- .../c6aca6.wgsl.expected.spvasm | 49 ++++++------ .../c6aca6.wgsl.expected.wgsl | 2 +- .../gen/var/textureSampleLevel/cdfe0f.wgsl | 4 +- .../cdfe0f.wgsl.expected.dxc.hlsl | 4 +- .../cdfe0f.wgsl.expected.fxc.hlsl | 4 +- .../cdfe0f.wgsl.expected.msl | 4 +- .../cdfe0f.wgsl.expected.spvasm | 72 +++++++++--------- .../cdfe0f.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/dcbecb.wgsl | 4 +- .../dcbecb.wgsl.expected.dxc.hlsl | 4 +- .../dcbecb.wgsl.expected.fxc.hlsl | 4 +- .../dcbecb.wgsl.expected.glsl | 12 +-- .../dcbecb.wgsl.expected.msl | 4 +- .../dcbecb.wgsl.expected.spvasm | 52 +++++++------ .../dcbecb.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/e6ce9e.wgsl | 4 +- .../e6ce9e.wgsl.expected.dxc.hlsl | 4 +- .../e6ce9e.wgsl.expected.fxc.hlsl | 4 +- .../e6ce9e.wgsl.expected.msl | 4 +- .../e6ce9e.wgsl.expected.spvasm | 73 +++++++++--------- .../e6ce9e.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/f3b2c8.wgsl | 4 +- .../f3b2c8.wgsl.expected.dxc.hlsl | 4 +- .../f3b2c8.wgsl.expected.fxc.hlsl | 4 +- .../f3b2c8.wgsl.expected.glsl | 12 +-- .../f3b2c8.wgsl.expected.msl | 4 +- .../f3b2c8.wgsl.expected.spvasm | 60 ++++++++------- .../f3b2c8.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/faa6d7.wgsl | 4 +- .../faa6d7.wgsl.expected.dxc.hlsl | 4 +- .../faa6d7.wgsl.expected.fxc.hlsl | 4 +- .../faa6d7.wgsl.expected.glsl | 12 +-- .../faa6d7.wgsl.expected.msl | 4 +- .../faa6d7.wgsl.expected.spvasm | 66 ++++++++-------- .../faa6d7.wgsl.expected.wgsl | 4 +- .../gen/var/textureSampleLevel/ff11bc.wgsl | 2 +- .../ff11bc.wgsl.expected.dxc.hlsl | 2 +- .../ff11bc.wgsl.expected.fxc.hlsl | 2 +- .../ff11bc.wgsl.expected.msl | 2 +- .../ff11bc.wgsl.expected.spvasm | 73 +++++++++--------- .../ff11bc.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/00ca64.wgsl | 4 +- .../00ca64.wgsl.expected.dxc.hlsl | 4 +- .../00ca64.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/00ca64.wgsl.expected.glsl | 12 +-- .../var/textureStore/00ca64.wgsl.expected.msl | 4 +- .../textureStore/00ca64.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/00ca64.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/0148bd.wgsl | 4 +- .../0148bd.wgsl.expected.dxc.hlsl | 4 +- .../0148bd.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/0148bd.wgsl.expected.glsl | 12 +-- .../var/textureStore/0148bd.wgsl.expected.msl | 4 +- .../textureStore/0148bd.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/0148bd.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/05ce15.wgsl | 4 +- .../05ce15.wgsl.expected.dxc.hlsl | 4 +- .../05ce15.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/05ce15.wgsl.expected.glsl | 12 +-- .../var/textureStore/05ce15.wgsl.expected.msl | 4 +- .../textureStore/05ce15.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/05ce15.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/064c7f.wgsl | 4 +- .../064c7f.wgsl.expected.dxc.hlsl | 4 +- .../064c7f.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/064c7f.wgsl.expected.msl | 4 +- .../textureStore/064c7f.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/064c7f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/068641.wgsl | 4 +- .../068641.wgsl.expected.dxc.hlsl | 4 +- .../068641.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/068641.wgsl.expected.glsl | 12 +-- .../var/textureStore/068641.wgsl.expected.msl | 4 +- .../textureStore/068641.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/068641.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/06e49c.wgsl | 4 +- .../06e49c.wgsl.expected.dxc.hlsl | 4 +- .../06e49c.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/06e49c.wgsl.expected.glsl | 12 +-- .../var/textureStore/06e49c.wgsl.expected.msl | 4 +- .../textureStore/06e49c.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/06e49c.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/07548b.wgsl | 4 +- .../07548b.wgsl.expected.dxc.hlsl | 4 +- .../07548b.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/07548b.wgsl.expected.glsl | 12 +-- .../var/textureStore/07548b.wgsl.expected.msl | 4 +- .../textureStore/07548b.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/07548b.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/0a1a79.wgsl | 4 +- .../0a1a79.wgsl.expected.dxc.hlsl | 4 +- .../0a1a79.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/0a1a79.wgsl.expected.glsl | 12 +-- .../var/textureStore/0a1a79.wgsl.expected.msl | 4 +- .../textureStore/0a1a79.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/0a1a79.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/0af6b5.wgsl | 4 +- .../0af6b5.wgsl.expected.dxc.hlsl | 4 +- .../0af6b5.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/0af6b5.wgsl.expected.glsl | 12 +-- .../var/textureStore/0af6b5.wgsl.expected.msl | 4 +- .../textureStore/0af6b5.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/0af6b5.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/0c3dff.wgsl | 4 +- .../0c3dff.wgsl.expected.dxc.hlsl | 4 +- .../0c3dff.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/0c3dff.wgsl.expected.glsl | 12 +-- .../var/textureStore/0c3dff.wgsl.expected.msl | 4 +- .../textureStore/0c3dff.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/0c3dff.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/0cc825.wgsl | 4 +- .../0cc825.wgsl.expected.dxc.hlsl | 4 +- .../0cc825.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/0cc825.wgsl.expected.glsl | 12 +-- .../var/textureStore/0cc825.wgsl.expected.msl | 4 +- .../textureStore/0cc825.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/0cc825.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/102722.wgsl | 2 +- .../102722.wgsl.expected.dxc.hlsl | 2 +- .../102722.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/102722.wgsl.expected.msl | 2 +- .../textureStore/102722.wgsl.expected.spvasm | 40 +++++----- .../textureStore/102722.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/158cf0.wgsl | 4 +- .../158cf0.wgsl.expected.dxc.hlsl | 4 +- .../158cf0.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/158cf0.wgsl.expected.glsl | 12 +-- .../var/textureStore/158cf0.wgsl.expected.msl | 4 +- .../textureStore/158cf0.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/158cf0.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/1839f2.wgsl | 4 +- .../1839f2.wgsl.expected.dxc.hlsl | 4 +- .../1839f2.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/1839f2.wgsl.expected.glsl | 12 +-- .../var/textureStore/1839f2.wgsl.expected.msl | 4 +- .../textureStore/1839f2.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/1839f2.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/1a7d35.wgsl | 4 +- .../1a7d35.wgsl.expected.dxc.hlsl | 4 +- .../1a7d35.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/1a7d35.wgsl.expected.glsl | 12 +-- .../var/textureStore/1a7d35.wgsl.expected.msl | 4 +- .../textureStore/1a7d35.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/1a7d35.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/1bbd08.wgsl | 4 +- .../1bbd08.wgsl.expected.dxc.hlsl | 4 +- .../1bbd08.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/1bbd08.wgsl.expected.glsl | 12 +-- .../var/textureStore/1bbd08.wgsl.expected.msl | 4 +- .../textureStore/1bbd08.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/1bbd08.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/1c02e7.wgsl | 4 +- .../1c02e7.wgsl.expected.dxc.hlsl | 4 +- .../1c02e7.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/1c02e7.wgsl.expected.glsl | 12 +-- .../var/textureStore/1c02e7.wgsl.expected.msl | 4 +- .../textureStore/1c02e7.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/1c02e7.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/1dc954.wgsl | 2 +- .../1dc954.wgsl.expected.dxc.hlsl | 2 +- .../1dc954.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/1dc954.wgsl.expected.msl | 2 +- .../textureStore/1dc954.wgsl.expected.spvasm | 40 +++++----- .../textureStore/1dc954.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/1e20f2.wgsl | 4 +- .../1e20f2.wgsl.expected.dxc.hlsl | 4 +- .../1e20f2.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/1e20f2.wgsl.expected.glsl | 12 +-- .../var/textureStore/1e20f2.wgsl.expected.msl | 4 +- .../textureStore/1e20f2.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/1e20f2.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/1f1ef8.wgsl | 4 +- .../1f1ef8.wgsl.expected.dxc.hlsl | 4 +- .../1f1ef8.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/1f1ef8.wgsl.expected.glsl | 12 +-- .../var/textureStore/1f1ef8.wgsl.expected.msl | 4 +- .../textureStore/1f1ef8.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/1f1ef8.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/207fdd.wgsl | 4 +- .../207fdd.wgsl.expected.dxc.hlsl | 4 +- .../207fdd.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/207fdd.wgsl.expected.glsl | 12 +-- .../var/textureStore/207fdd.wgsl.expected.msl | 4 +- .../textureStore/207fdd.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/207fdd.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/22d955.wgsl | 4 +- .../22d955.wgsl.expected.dxc.hlsl | 4 +- .../22d955.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/22d955.wgsl.expected.glsl | 12 +-- .../var/textureStore/22d955.wgsl.expected.msl | 4 +- .../textureStore/22d955.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/22d955.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/22f045.wgsl | 4 +- .../22f045.wgsl.expected.dxc.hlsl | 4 +- .../22f045.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/22f045.wgsl.expected.glsl | 12 +-- .../var/textureStore/22f045.wgsl.expected.msl | 4 +- .../textureStore/22f045.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/22f045.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/2383fc.wgsl | 4 +- .../2383fc.wgsl.expected.dxc.hlsl | 4 +- .../2383fc.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/2383fc.wgsl.expected.glsl | 12 +-- .../var/textureStore/2383fc.wgsl.expected.msl | 4 +- .../textureStore/2383fc.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/2383fc.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/258ab0.wgsl | 4 +- .../258ab0.wgsl.expected.dxc.hlsl | 4 +- .../258ab0.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/258ab0.wgsl.expected.glsl | 12 +-- .../var/textureStore/258ab0.wgsl.expected.msl | 4 +- .../textureStore/258ab0.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/258ab0.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/26bf70.wgsl | 4 +- .../26bf70.wgsl.expected.dxc.hlsl | 4 +- .../26bf70.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/26bf70.wgsl.expected.glsl | 12 +-- .../var/textureStore/26bf70.wgsl.expected.msl | 4 +- .../textureStore/26bf70.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/26bf70.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/2796b4.wgsl | 4 +- .../2796b4.wgsl.expected.dxc.hlsl | 4 +- .../2796b4.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/2796b4.wgsl.expected.msl | 4 +- .../textureStore/2796b4.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/2796b4.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/285218.wgsl | 2 +- .../285218.wgsl.expected.dxc.hlsl | 2 +- .../285218.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/285218.wgsl.expected.msl | 2 +- .../textureStore/285218.wgsl.expected.spvasm | 37 ++++----- .../textureStore/285218.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/28a7ec.wgsl | 4 +- .../28a7ec.wgsl.expected.dxc.hlsl | 4 +- .../28a7ec.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/28a7ec.wgsl.expected.glsl | 12 +-- .../var/textureStore/28a7ec.wgsl.expected.msl | 4 +- .../textureStore/28a7ec.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/28a7ec.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/2ac6c7.wgsl | 2 +- .../2ac6c7.wgsl.expected.dxc.hlsl | 2 +- .../2ac6c7.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/2ac6c7.wgsl.expected.msl | 2 +- .../textureStore/2ac6c7.wgsl.expected.spvasm | 37 ++++----- .../textureStore/2ac6c7.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/2d2835.wgsl | 4 +- .../2d2835.wgsl.expected.dxc.hlsl | 4 +- .../2d2835.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/2d2835.wgsl.expected.msl | 4 +- .../textureStore/2d2835.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/2d2835.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/2e6102.wgsl | 4 +- .../2e6102.wgsl.expected.dxc.hlsl | 4 +- .../2e6102.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/2e6102.wgsl.expected.glsl | 12 +-- .../var/textureStore/2e6102.wgsl.expected.msl | 4 +- .../textureStore/2e6102.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/2e6102.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/2eb2a4.wgsl | 2 +- .../2eb2a4.wgsl.expected.dxc.hlsl | 2 +- .../2eb2a4.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/2eb2a4.wgsl.expected.msl | 2 +- .../textureStore/2eb2a4.wgsl.expected.spvasm | 40 +++++----- .../textureStore/2eb2a4.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/2ed2a3.wgsl | 2 +- .../2ed2a3.wgsl.expected.dxc.hlsl | 2 +- .../2ed2a3.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/2ed2a3.wgsl.expected.msl | 2 +- .../textureStore/2ed2a3.wgsl.expected.spvasm | 37 ++++----- .../textureStore/2ed2a3.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/30b0b0.wgsl | 4 +- .../30b0b0.wgsl.expected.dxc.hlsl | 4 +- .../30b0b0.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/30b0b0.wgsl.expected.glsl | 12 +-- .../var/textureStore/30b0b0.wgsl.expected.msl | 4 +- .../textureStore/30b0b0.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/30b0b0.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/31745b.wgsl | 4 +- .../31745b.wgsl.expected.dxc.hlsl | 4 +- .../31745b.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/31745b.wgsl.expected.msl | 4 +- .../textureStore/31745b.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/31745b.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/32f368.wgsl | 4 +- .../32f368.wgsl.expected.dxc.hlsl | 4 +- .../32f368.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/32f368.wgsl.expected.glsl | 12 +-- .../var/textureStore/32f368.wgsl.expected.msl | 4 +- .../textureStore/32f368.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/32f368.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/330b7c.wgsl | 4 +- .../330b7c.wgsl.expected.dxc.hlsl | 4 +- .../330b7c.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/330b7c.wgsl.expected.glsl | 12 +-- .../var/textureStore/330b7c.wgsl.expected.msl | 4 +- .../textureStore/330b7c.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/330b7c.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/331aee.wgsl | 4 +- .../331aee.wgsl.expected.dxc.hlsl | 4 +- .../331aee.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/331aee.wgsl.expected.glsl | 12 +-- .../var/textureStore/331aee.wgsl.expected.msl | 4 +- .../textureStore/331aee.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/331aee.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/33cec0.wgsl | 4 +- .../33cec0.wgsl.expected.dxc.hlsl | 4 +- .../33cec0.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/33cec0.wgsl.expected.glsl | 12 +-- .../var/textureStore/33cec0.wgsl.expected.msl | 4 +- .../textureStore/33cec0.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/33cec0.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/37ffd4.wgsl | 4 +- .../37ffd4.wgsl.expected.dxc.hlsl | 4 +- .../37ffd4.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/37ffd4.wgsl.expected.glsl | 12 +-- .../var/textureStore/37ffd4.wgsl.expected.msl | 4 +- .../textureStore/37ffd4.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/37ffd4.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/38e8d7.wgsl | 4 +- .../38e8d7.wgsl.expected.dxc.hlsl | 4 +- .../38e8d7.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/38e8d7.wgsl.expected.glsl | 12 +-- .../var/textureStore/38e8d7.wgsl.expected.msl | 4 +- .../textureStore/38e8d7.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/38e8d7.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/3a52ac.wgsl | 4 +- .../3a52ac.wgsl.expected.dxc.hlsl | 4 +- .../3a52ac.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/3a52ac.wgsl.expected.glsl | 12 +-- .../var/textureStore/3a52ac.wgsl.expected.msl | 4 +- .../textureStore/3a52ac.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/3a52ac.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/3bb7a1.wgsl | 4 +- .../3bb7a1.wgsl.expected.dxc.hlsl | 4 +- .../3bb7a1.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/3bb7a1.wgsl.expected.glsl | 12 +-- .../var/textureStore/3bb7a1.wgsl.expected.msl | 4 +- .../textureStore/3bb7a1.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/3bb7a1.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/3bec15.wgsl | 2 +- .../3bec15.wgsl.expected.dxc.hlsl | 2 +- .../3bec15.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/3bec15.wgsl.expected.msl | 2 +- .../textureStore/3bec15.wgsl.expected.spvasm | 40 +++++----- .../textureStore/3bec15.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/3c1937.wgsl | 2 +- .../3c1937.wgsl.expected.dxc.hlsl | 2 +- .../3c1937.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/3c1937.wgsl.expected.msl | 2 +- .../textureStore/3c1937.wgsl.expected.spvasm | 37 ++++----- .../textureStore/3c1937.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/3d6f01.wgsl | 2 +- .../3d6f01.wgsl.expected.dxc.hlsl | 2 +- .../3d6f01.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/3d6f01.wgsl.expected.msl | 2 +- .../textureStore/3d6f01.wgsl.expected.spvasm | 40 +++++----- .../textureStore/3d6f01.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/40c455.wgsl | 4 +- .../40c455.wgsl.expected.dxc.hlsl | 4 +- .../40c455.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/40c455.wgsl.expected.glsl | 12 +-- .../var/textureStore/40c455.wgsl.expected.msl | 4 +- .../textureStore/40c455.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/40c455.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/4288fc.wgsl | 4 +- .../4288fc.wgsl.expected.dxc.hlsl | 4 +- .../4288fc.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/4288fc.wgsl.expected.glsl | 12 +-- .../var/textureStore/4288fc.wgsl.expected.msl | 4 +- .../textureStore/4288fc.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/4288fc.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/441ba8.wgsl | 4 +- .../441ba8.wgsl.expected.dxc.hlsl | 4 +- .../441ba8.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/441ba8.wgsl.expected.glsl | 12 +-- .../var/textureStore/441ba8.wgsl.expected.msl | 4 +- .../textureStore/441ba8.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/441ba8.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/44daa7.wgsl | 4 +- .../44daa7.wgsl.expected.dxc.hlsl | 4 +- .../44daa7.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/44daa7.wgsl.expected.glsl | 12 +-- .../var/textureStore/44daa7.wgsl.expected.msl | 4 +- .../textureStore/44daa7.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/44daa7.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/486500.wgsl | 4 +- .../486500.wgsl.expected.dxc.hlsl | 4 +- .../486500.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/486500.wgsl.expected.glsl | 12 +-- .../var/textureStore/486500.wgsl.expected.msl | 4 +- .../textureStore/486500.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/486500.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/4c454f.wgsl | 4 +- .../4c454f.wgsl.expected.dxc.hlsl | 4 +- .../4c454f.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/4c454f.wgsl.expected.msl | 4 +- .../textureStore/4c454f.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/4c454f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/4d359d.wgsl | 4 +- .../4d359d.wgsl.expected.dxc.hlsl | 4 +- .../4d359d.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/4d359d.wgsl.expected.msl | 4 +- .../textureStore/4d359d.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/4d359d.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/4fc057.wgsl | 4 +- .../4fc057.wgsl.expected.dxc.hlsl | 4 +- .../4fc057.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/4fc057.wgsl.expected.glsl | 12 +-- .../var/textureStore/4fc057.wgsl.expected.msl | 4 +- .../textureStore/4fc057.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/4fc057.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/506a71.wgsl | 4 +- .../506a71.wgsl.expected.dxc.hlsl | 4 +- .../506a71.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/506a71.wgsl.expected.msl | 4 +- .../textureStore/506a71.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/506a71.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/52f503.wgsl | 4 +- .../52f503.wgsl.expected.dxc.hlsl | 4 +- .../52f503.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/52f503.wgsl.expected.glsl | 12 +-- .../var/textureStore/52f503.wgsl.expected.msl | 4 +- .../textureStore/52f503.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/52f503.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/5841f8.wgsl | 4 +- .../5841f8.wgsl.expected.dxc.hlsl | 4 +- .../5841f8.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/5841f8.wgsl.expected.glsl | 12 +-- .../var/textureStore/5841f8.wgsl.expected.msl | 4 +- .../textureStore/5841f8.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/5841f8.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/59a0ab.wgsl | 4 +- .../59a0ab.wgsl.expected.dxc.hlsl | 4 +- .../59a0ab.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/59a0ab.wgsl.expected.glsl | 12 +-- .../var/textureStore/59a0ab.wgsl.expected.msl | 4 +- .../textureStore/59a0ab.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/59a0ab.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/5a2f8f.wgsl | 2 +- .../5a2f8f.wgsl.expected.dxc.hlsl | 2 +- .../5a2f8f.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/5a2f8f.wgsl.expected.msl | 2 +- .../textureStore/5a2f8f.wgsl.expected.spvasm | 37 ++++----- .../textureStore/5a2f8f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/5bc4f3.wgsl | 4 +- .../5bc4f3.wgsl.expected.dxc.hlsl | 4 +- .../5bc4f3.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/5bc4f3.wgsl.expected.msl | 4 +- .../textureStore/5bc4f3.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/5bc4f3.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/5ddc61.wgsl | 4 +- .../5ddc61.wgsl.expected.dxc.hlsl | 4 +- .../5ddc61.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/5ddc61.wgsl.expected.glsl | 12 +-- .../var/textureStore/5ddc61.wgsl.expected.msl | 4 +- .../textureStore/5ddc61.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/5ddc61.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/5f9a49.wgsl | 4 +- .../5f9a49.wgsl.expected.dxc.hlsl | 4 +- .../5f9a49.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/5f9a49.wgsl.expected.glsl | 12 +-- .../var/textureStore/5f9a49.wgsl.expected.msl | 4 +- .../textureStore/5f9a49.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/5f9a49.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/602b5a.wgsl | 2 +- .../602b5a.wgsl.expected.dxc.hlsl | 2 +- .../602b5a.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/602b5a.wgsl.expected.msl | 2 +- .../textureStore/602b5a.wgsl.expected.spvasm | 37 ++++----- .../textureStore/602b5a.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/60975f.wgsl | 4 +- .../60975f.wgsl.expected.dxc.hlsl | 4 +- .../60975f.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/60975f.wgsl.expected.glsl | 12 +-- .../var/textureStore/60975f.wgsl.expected.msl | 4 +- .../textureStore/60975f.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/60975f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/658a74.wgsl | 4 +- .../658a74.wgsl.expected.dxc.hlsl | 4 +- .../658a74.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/658a74.wgsl.expected.msl | 4 +- .../textureStore/658a74.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/658a74.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/682fd6.wgsl | 4 +- .../682fd6.wgsl.expected.dxc.hlsl | 4 +- .../682fd6.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/682fd6.wgsl.expected.msl | 4 +- .../textureStore/682fd6.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/682fd6.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/699a1b.wgsl | 4 +- .../699a1b.wgsl.expected.dxc.hlsl | 4 +- .../699a1b.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/699a1b.wgsl.expected.glsl | 12 +-- .../var/textureStore/699a1b.wgsl.expected.msl | 4 +- .../textureStore/699a1b.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/699a1b.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/6b75c3.wgsl | 2 +- .../6b75c3.wgsl.expected.dxc.hlsl | 2 +- .../6b75c3.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/6b75c3.wgsl.expected.msl | 2 +- .../textureStore/6b75c3.wgsl.expected.spvasm | 37 ++++----- .../textureStore/6b75c3.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/6b80d2.wgsl | 2 +- .../6b80d2.wgsl.expected.dxc.hlsl | 2 +- .../6b80d2.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/6b80d2.wgsl.expected.msl | 2 +- .../textureStore/6b80d2.wgsl.expected.spvasm | 37 ++++----- .../textureStore/6b80d2.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/6cff2e.wgsl | 4 +- .../6cff2e.wgsl.expected.dxc.hlsl | 4 +- .../6cff2e.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/6cff2e.wgsl.expected.glsl | 12 +-- .../var/textureStore/6cff2e.wgsl.expected.msl | 4 +- .../textureStore/6cff2e.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/6cff2e.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/6da692.wgsl | 4 +- .../6da692.wgsl.expected.dxc.hlsl | 4 +- .../6da692.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/6da692.wgsl.expected.glsl | 12 +-- .../var/textureStore/6da692.wgsl.expected.msl | 4 +- .../textureStore/6da692.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/6da692.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/6f8642.wgsl | 4 +- .../6f8642.wgsl.expected.dxc.hlsl | 4 +- .../6f8642.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/6f8642.wgsl.expected.glsl | 12 +-- .../var/textureStore/6f8642.wgsl.expected.msl | 4 +- .../textureStore/6f8642.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/6f8642.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/726472.wgsl | 4 +- .../726472.wgsl.expected.dxc.hlsl | 4 +- .../726472.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/726472.wgsl.expected.msl | 4 +- .../textureStore/726472.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/726472.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/72fa64.wgsl | 4 +- .../72fa64.wgsl.expected.dxc.hlsl | 4 +- .../72fa64.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/72fa64.wgsl.expected.msl | 4 +- .../textureStore/72fa64.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/72fa64.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/731349.wgsl | 4 +- .../731349.wgsl.expected.dxc.hlsl | 4 +- .../731349.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/731349.wgsl.expected.glsl | 12 +-- .../var/textureStore/731349.wgsl.expected.msl | 4 +- .../textureStore/731349.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/731349.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/73bbbc.wgsl | 4 +- .../73bbbc.wgsl.expected.dxc.hlsl | 4 +- .../73bbbc.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/73bbbc.wgsl.expected.glsl | 12 +-- .../var/textureStore/73bbbc.wgsl.expected.msl | 4 +- .../textureStore/73bbbc.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/73bbbc.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/752da6.wgsl | 4 +- .../752da6.wgsl.expected.dxc.hlsl | 4 +- .../752da6.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/752da6.wgsl.expected.glsl | 12 +-- .../var/textureStore/752da6.wgsl.expected.msl | 4 +- .../textureStore/752da6.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/752da6.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/779d14.wgsl | 4 +- .../779d14.wgsl.expected.dxc.hlsl | 4 +- .../779d14.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/779d14.wgsl.expected.glsl | 12 +-- .../var/textureStore/779d14.wgsl.expected.msl | 4 +- .../textureStore/779d14.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/779d14.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/77c0ae.wgsl | 4 +- .../77c0ae.wgsl.expected.dxc.hlsl | 4 +- .../77c0ae.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/77c0ae.wgsl.expected.glsl | 12 +-- .../var/textureStore/77c0ae.wgsl.expected.msl | 4 +- .../textureStore/77c0ae.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/77c0ae.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/7bb211.wgsl | 4 +- .../7bb211.wgsl.expected.dxc.hlsl | 4 +- .../7bb211.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/7bb211.wgsl.expected.msl | 4 +- .../textureStore/7bb211.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/7bb211.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/7cec8d.wgsl | 4 +- .../7cec8d.wgsl.expected.dxc.hlsl | 4 +- .../7cec8d.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/7cec8d.wgsl.expected.glsl | 12 +-- .../var/textureStore/7cec8d.wgsl.expected.msl | 4 +- .../textureStore/7cec8d.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/7cec8d.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/7cf6e7.wgsl | 4 +- .../7cf6e7.wgsl.expected.dxc.hlsl | 4 +- .../7cf6e7.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/7cf6e7.wgsl.expected.glsl | 12 +-- .../var/textureStore/7cf6e7.wgsl.expected.msl | 4 +- .../textureStore/7cf6e7.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/7cf6e7.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/7f7fae.wgsl | 2 +- .../7f7fae.wgsl.expected.dxc.hlsl | 2 +- .../7f7fae.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/7f7fae.wgsl.expected.msl | 2 +- .../textureStore/7f7fae.wgsl.expected.spvasm | 37 ++++----- .../textureStore/7f7fae.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/804942.wgsl | 4 +- .../804942.wgsl.expected.dxc.hlsl | 4 +- .../804942.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/804942.wgsl.expected.glsl | 12 +-- .../var/textureStore/804942.wgsl.expected.msl | 4 +- .../textureStore/804942.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/804942.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/805dae.wgsl | 4 +- .../805dae.wgsl.expected.dxc.hlsl | 4 +- .../805dae.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/805dae.wgsl.expected.glsl | 12 +-- .../var/textureStore/805dae.wgsl.expected.msl | 4 +- .../textureStore/805dae.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/805dae.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/83bcc1.wgsl | 2 +- .../83bcc1.wgsl.expected.dxc.hlsl | 2 +- .../83bcc1.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/83bcc1.wgsl.expected.msl | 2 +- .../textureStore/83bcc1.wgsl.expected.spvasm | 40 +++++----- .../textureStore/83bcc1.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/872747.wgsl | 2 +- .../872747.wgsl.expected.dxc.hlsl | 2 +- .../872747.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/872747.wgsl.expected.msl | 2 +- .../textureStore/872747.wgsl.expected.spvasm | 37 ++++----- .../textureStore/872747.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/8b9310.wgsl | 4 +- .../8b9310.wgsl.expected.dxc.hlsl | 4 +- .../8b9310.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/8b9310.wgsl.expected.glsl | 12 +-- .../var/textureStore/8b9310.wgsl.expected.msl | 4 +- .../textureStore/8b9310.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/8b9310.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/8bb287.wgsl | 4 +- .../8bb287.wgsl.expected.dxc.hlsl | 4 +- .../8bb287.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/8bb287.wgsl.expected.glsl | 12 +-- .../var/textureStore/8bb287.wgsl.expected.msl | 4 +- .../textureStore/8bb287.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/8bb287.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/8c76e9.wgsl | 2 +- .../8c76e9.wgsl.expected.dxc.hlsl | 2 +- .../8c76e9.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/8c76e9.wgsl.expected.msl | 2 +- .../textureStore/8c76e9.wgsl.expected.spvasm | 40 +++++----- .../textureStore/8c76e9.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/8dc54f.wgsl | 4 +- .../8dc54f.wgsl.expected.dxc.hlsl | 4 +- .../8dc54f.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/8dc54f.wgsl.expected.glsl | 12 +-- .../var/textureStore/8dc54f.wgsl.expected.msl | 4 +- .../textureStore/8dc54f.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/8dc54f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/8e0479.wgsl | 4 +- .../8e0479.wgsl.expected.dxc.hlsl | 4 +- .../8e0479.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/8e0479.wgsl.expected.glsl | 12 +-- .../var/textureStore/8e0479.wgsl.expected.msl | 4 +- .../textureStore/8e0479.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/8e0479.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/8ed9f8.wgsl | 4 +- .../8ed9f8.wgsl.expected.dxc.hlsl | 4 +- .../8ed9f8.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/8ed9f8.wgsl.expected.glsl | 12 +-- .../var/textureStore/8ed9f8.wgsl.expected.msl | 4 +- .../textureStore/8ed9f8.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/8ed9f8.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/8f71a1.wgsl | 4 +- .../8f71a1.wgsl.expected.dxc.hlsl | 4 +- .../8f71a1.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/8f71a1.wgsl.expected.glsl | 12 +-- .../var/textureStore/8f71a1.wgsl.expected.msl | 4 +- .../textureStore/8f71a1.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/8f71a1.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/8ff674.wgsl | 4 +- .../8ff674.wgsl.expected.dxc.hlsl | 4 +- .../8ff674.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/8ff674.wgsl.expected.glsl | 12 +-- .../var/textureStore/8ff674.wgsl.expected.msl | 4 +- .../textureStore/8ff674.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/8ff674.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/958353.wgsl | 2 +- .../958353.wgsl.expected.dxc.hlsl | 2 +- .../958353.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/958353.wgsl.expected.msl | 2 +- .../textureStore/958353.wgsl.expected.spvasm | 40 +++++----- .../textureStore/958353.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/959d94.wgsl | 2 +- .../959d94.wgsl.expected.dxc.hlsl | 2 +- .../959d94.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/959d94.wgsl.expected.msl | 2 +- .../textureStore/959d94.wgsl.expected.spvasm | 37 ++++----- .../textureStore/959d94.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/95e452.wgsl | 4 +- .../95e452.wgsl.expected.dxc.hlsl | 4 +- .../95e452.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/95e452.wgsl.expected.glsl | 12 +-- .../var/textureStore/95e452.wgsl.expected.msl | 4 +- .../textureStore/95e452.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/95e452.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/969534.wgsl | 2 +- .../969534.wgsl.expected.dxc.hlsl | 2 +- .../969534.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/969534.wgsl.expected.msl | 2 +- .../textureStore/969534.wgsl.expected.spvasm | 37 ++++----- .../textureStore/969534.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/9938b7.wgsl | 4 +- .../9938b7.wgsl.expected.dxc.hlsl | 4 +- .../9938b7.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/9938b7.wgsl.expected.glsl | 12 +-- .../var/textureStore/9938b7.wgsl.expected.msl | 4 +- .../textureStore/9938b7.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/9938b7.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/9a3ecc.wgsl | 4 +- .../9a3ecc.wgsl.expected.dxc.hlsl | 4 +- .../9a3ecc.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/9a3ecc.wgsl.expected.glsl | 12 +-- .../var/textureStore/9a3ecc.wgsl.expected.msl | 4 +- .../textureStore/9a3ecc.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/9a3ecc.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/9d8668.wgsl | 4 +- .../9d8668.wgsl.expected.dxc.hlsl | 4 +- .../9d8668.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/9d8668.wgsl.expected.glsl | 12 +-- .../var/textureStore/9d8668.wgsl.expected.msl | 4 +- .../textureStore/9d8668.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/9d8668.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/9d9cd5.wgsl | 4 +- .../9d9cd5.wgsl.expected.dxc.hlsl | 4 +- .../9d9cd5.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/9d9cd5.wgsl.expected.glsl | 12 +-- .../var/textureStore/9d9cd5.wgsl.expected.msl | 4 +- .../textureStore/9d9cd5.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/9d9cd5.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/9e3ec5.wgsl | 4 +- .../9e3ec5.wgsl.expected.dxc.hlsl | 4 +- .../9e3ec5.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/9e3ec5.wgsl.expected.glsl | 12 +-- .../var/textureStore/9e3ec5.wgsl.expected.msl | 4 +- .../textureStore/9e3ec5.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/9e3ec5.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/9f5318.wgsl | 4 +- .../9f5318.wgsl.expected.dxc.hlsl | 4 +- .../9f5318.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/9f5318.wgsl.expected.msl | 4 +- .../textureStore/9f5318.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/9f5318.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/9f7cea.wgsl | 4 +- .../9f7cea.wgsl.expected.dxc.hlsl | 4 +- .../9f7cea.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/9f7cea.wgsl.expected.glsl | 12 +-- .../var/textureStore/9f7cea.wgsl.expected.msl | 4 +- .../textureStore/9f7cea.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/9f7cea.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/a0f96e.wgsl | 4 +- .../a0f96e.wgsl.expected.dxc.hlsl | 4 +- .../a0f96e.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/a0f96e.wgsl.expected.glsl | 12 +-- .../var/textureStore/a0f96e.wgsl.expected.msl | 4 +- .../textureStore/a0f96e.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/a0f96e.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/a1352c.wgsl | 4 +- .../a1352c.wgsl.expected.dxc.hlsl | 4 +- .../a1352c.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/a1352c.wgsl.expected.glsl | 12 +-- .../var/textureStore/a1352c.wgsl.expected.msl | 4 +- .../textureStore/a1352c.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/a1352c.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/a4c338.wgsl | 2 +- .../a4c338.wgsl.expected.dxc.hlsl | 2 +- .../a4c338.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/a4c338.wgsl.expected.msl | 2 +- .../textureStore/a4c338.wgsl.expected.spvasm | 37 ++++----- .../textureStore/a4c338.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/a5e80d.wgsl | 4 +- .../a5e80d.wgsl.expected.dxc.hlsl | 4 +- .../a5e80d.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/a5e80d.wgsl.expected.glsl | 12 +-- .../var/textureStore/a5e80d.wgsl.expected.msl | 4 +- .../textureStore/a5e80d.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/a5e80d.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/a6a986.wgsl | 4 +- .../a6a986.wgsl.expected.dxc.hlsl | 4 +- .../a6a986.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/a6a986.wgsl.expected.glsl | 12 +-- .../var/textureStore/a6a986.wgsl.expected.msl | 4 +- .../textureStore/a6a986.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/a6a986.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/a6e78f.wgsl | 2 +- .../a6e78f.wgsl.expected.dxc.hlsl | 2 +- .../a6e78f.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/a6e78f.wgsl.expected.msl | 2 +- .../textureStore/a6e78f.wgsl.expected.spvasm | 37 ++++----- .../textureStore/a6e78f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/a9426c.wgsl | 4 +- .../a9426c.wgsl.expected.dxc.hlsl | 4 +- .../a9426c.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/a9426c.wgsl.expected.glsl | 12 +-- .../var/textureStore/a9426c.wgsl.expected.msl | 4 +- .../textureStore/a9426c.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/a9426c.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/ac67aa.wgsl | 4 +- .../ac67aa.wgsl.expected.dxc.hlsl | 4 +- .../ac67aa.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/ac67aa.wgsl.expected.msl | 4 +- .../textureStore/ac67aa.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/ac67aa.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/aeb38a.wgsl | 4 +- .../aeb38a.wgsl.expected.dxc.hlsl | 4 +- .../aeb38a.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/aeb38a.wgsl.expected.glsl | 12 +-- .../var/textureStore/aeb38a.wgsl.expected.msl | 4 +- .../textureStore/aeb38a.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/aeb38a.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/b42fd3.wgsl | 4 +- .../b42fd3.wgsl.expected.dxc.hlsl | 4 +- .../b42fd3.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/b42fd3.wgsl.expected.glsl | 12 +-- .../var/textureStore/b42fd3.wgsl.expected.msl | 4 +- .../textureStore/b42fd3.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/b42fd3.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/b706b1.wgsl | 4 +- .../b706b1.wgsl.expected.dxc.hlsl | 4 +- .../b706b1.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/b706b1.wgsl.expected.glsl | 12 +-- .../var/textureStore/b706b1.wgsl.expected.msl | 4 +- .../textureStore/b706b1.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/b706b1.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/b70ded.wgsl | 2 +- .../b70ded.wgsl.expected.dxc.hlsl | 2 +- .../b70ded.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/b70ded.wgsl.expected.msl | 2 +- .../textureStore/b70ded.wgsl.expected.spvasm | 37 ++++----- .../textureStore/b70ded.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/b76ff3.wgsl | 4 +- .../b76ff3.wgsl.expected.dxc.hlsl | 4 +- .../b76ff3.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/b76ff3.wgsl.expected.glsl | 12 +-- .../var/textureStore/b76ff3.wgsl.expected.msl | 4 +- .../textureStore/b76ff3.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/b76ff3.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/b77161.wgsl | 2 +- .../b77161.wgsl.expected.dxc.hlsl | 2 +- .../b77161.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/b77161.wgsl.expected.msl | 2 +- .../textureStore/b77161.wgsl.expected.spvasm | 37 ++++----- .../textureStore/b77161.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/bbcb7f.wgsl | 4 +- .../bbcb7f.wgsl.expected.dxc.hlsl | 4 +- .../bbcb7f.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/bbcb7f.wgsl.expected.glsl | 12 +-- .../var/textureStore/bbcb7f.wgsl.expected.msl | 4 +- .../textureStore/bbcb7f.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/bbcb7f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/be6e30.wgsl | 4 +- .../be6e30.wgsl.expected.dxc.hlsl | 4 +- .../be6e30.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/be6e30.wgsl.expected.glsl | 12 +-- .../var/textureStore/be6e30.wgsl.expected.msl | 4 +- .../textureStore/be6e30.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/be6e30.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/bf775c.wgsl | 2 +- .../bf775c.wgsl.expected.dxc.hlsl | 2 +- .../bf775c.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/bf775c.wgsl.expected.msl | 2 +- .../textureStore/bf775c.wgsl.expected.spvasm | 37 ++++----- .../textureStore/bf775c.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/c1f29e.wgsl | 2 +- .../c1f29e.wgsl.expected.dxc.hlsl | 2 +- .../c1f29e.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/c1f29e.wgsl.expected.msl | 2 +- .../textureStore/c1f29e.wgsl.expected.spvasm | 37 ++++----- .../textureStore/c1f29e.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/c2ca46.wgsl | 4 +- .../c2ca46.wgsl.expected.dxc.hlsl | 4 +- .../c2ca46.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/c2ca46.wgsl.expected.glsl | 12 +-- .../var/textureStore/c2ca46.wgsl.expected.msl | 4 +- .../textureStore/c2ca46.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/c2ca46.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/c32905.wgsl | 4 +- .../c32905.wgsl.expected.dxc.hlsl | 4 +- .../c32905.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/c32905.wgsl.expected.glsl | 12 +-- .../var/textureStore/c32905.wgsl.expected.msl | 4 +- .../textureStore/c32905.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/c32905.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/c5af1e.wgsl | 4 +- .../c5af1e.wgsl.expected.dxc.hlsl | 4 +- .../c5af1e.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/c5af1e.wgsl.expected.glsl | 12 +-- .../var/textureStore/c5af1e.wgsl.expected.msl | 4 +- .../textureStore/c5af1e.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/c5af1e.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/c863be.wgsl | 4 +- .../c863be.wgsl.expected.dxc.hlsl | 4 +- .../c863be.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/c863be.wgsl.expected.msl | 4 +- .../textureStore/c863be.wgsl.expected.spvasm | 58 +++++++------- .../textureStore/c863be.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/cb3b0b.wgsl | 4 +- .../cb3b0b.wgsl.expected.dxc.hlsl | 4 +- .../cb3b0b.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/cb3b0b.wgsl.expected.glsl | 12 +-- .../var/textureStore/cb3b0b.wgsl.expected.msl | 4 +- .../textureStore/cb3b0b.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/cb3b0b.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/d26166.wgsl | 2 +- .../d26166.wgsl.expected.dxc.hlsl | 2 +- .../d26166.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/d26166.wgsl.expected.msl | 2 +- .../textureStore/d26166.wgsl.expected.spvasm | 37 ++++----- .../textureStore/d26166.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/d55e65.wgsl | 4 +- .../d55e65.wgsl.expected.dxc.hlsl | 4 +- .../d55e65.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/d55e65.wgsl.expected.glsl | 12 +-- .../var/textureStore/d55e65.wgsl.expected.msl | 4 +- .../textureStore/d55e65.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/d55e65.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/d73b5c.wgsl | 2 +- .../d73b5c.wgsl.expected.dxc.hlsl | 2 +- .../d73b5c.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/d73b5c.wgsl.expected.msl | 2 +- .../textureStore/d73b5c.wgsl.expected.spvasm | 37 ++++----- .../textureStore/d73b5c.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/d82b0a.wgsl | 4 +- .../d82b0a.wgsl.expected.dxc.hlsl | 4 +- .../d82b0a.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/d82b0a.wgsl.expected.msl | 4 +- .../textureStore/d82b0a.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/d82b0a.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/db92a2.wgsl | 4 +- .../db92a2.wgsl.expected.dxc.hlsl | 4 +- .../db92a2.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/db92a2.wgsl.expected.glsl | 12 +-- .../var/textureStore/db92a2.wgsl.expected.msl | 4 +- .../textureStore/db92a2.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/db92a2.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/dd7d81.wgsl | 4 +- .../dd7d81.wgsl.expected.dxc.hlsl | 4 +- .../dd7d81.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/dd7d81.wgsl.expected.glsl | 12 +-- .../var/textureStore/dd7d81.wgsl.expected.msl | 4 +- .../textureStore/dd7d81.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/dd7d81.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/dde364.wgsl | 4 +- .../dde364.wgsl.expected.dxc.hlsl | 4 +- .../dde364.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/dde364.wgsl.expected.msl | 4 +- .../textureStore/dde364.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/dde364.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/de4b94.wgsl | 2 +- .../de4b94.wgsl.expected.dxc.hlsl | 2 +- .../de4b94.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/de4b94.wgsl.expected.msl | 2 +- .../textureStore/de4b94.wgsl.expected.spvasm | 40 +++++----- .../textureStore/de4b94.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/df2ca4.wgsl | 4 +- .../df2ca4.wgsl.expected.dxc.hlsl | 4 +- .../df2ca4.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/df2ca4.wgsl.expected.glsl | 12 +-- .../var/textureStore/df2ca4.wgsl.expected.msl | 4 +- .../textureStore/df2ca4.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/df2ca4.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/dfa9a1.wgsl | 4 +- .../dfa9a1.wgsl.expected.dxc.hlsl | 4 +- .../dfa9a1.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/dfa9a1.wgsl.expected.msl | 4 +- .../textureStore/dfa9a1.wgsl.expected.spvasm | 61 ++++++++------- .../textureStore/dfa9a1.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/dffb13.wgsl | 4 +- .../dffb13.wgsl.expected.dxc.hlsl | 4 +- .../dffb13.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/dffb13.wgsl.expected.msl | 4 +- .../textureStore/dffb13.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/dffb13.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/e7c6d8.wgsl | 2 +- .../e7c6d8.wgsl.expected.dxc.hlsl | 2 +- .../e7c6d8.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/e7c6d8.wgsl.expected.msl | 2 +- .../textureStore/e7c6d8.wgsl.expected.spvasm | 37 ++++----- .../textureStore/e7c6d8.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/e885e8.wgsl | 2 +- .../e885e8.wgsl.expected.dxc.hlsl | 2 +- .../e885e8.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/e885e8.wgsl.expected.msl | 2 +- .../textureStore/e885e8.wgsl.expected.spvasm | 37 ++++----- .../textureStore/e885e8.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/e8cbf7.wgsl | 4 +- .../e8cbf7.wgsl.expected.dxc.hlsl | 4 +- .../e8cbf7.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/e8cbf7.wgsl.expected.glsl | 12 +-- .../var/textureStore/e8cbf7.wgsl.expected.msl | 4 +- .../textureStore/e8cbf7.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/e8cbf7.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/eb702f.wgsl | 4 +- .../eb702f.wgsl.expected.dxc.hlsl | 4 +- .../eb702f.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/eb702f.wgsl.expected.glsl | 12 +-- .../var/textureStore/eb702f.wgsl.expected.msl | 4 +- .../textureStore/eb702f.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/eb702f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/eb78b9.wgsl | 4 +- .../eb78b9.wgsl.expected.dxc.hlsl | 4 +- .../eb78b9.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/eb78b9.wgsl.expected.glsl | 12 +-- .../var/textureStore/eb78b9.wgsl.expected.msl | 4 +- .../textureStore/eb78b9.wgsl.expected.spvasm | 49 ++++++------ .../textureStore/eb78b9.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/ee6acc.wgsl | 4 +- .../ee6acc.wgsl.expected.dxc.hlsl | 4 +- .../ee6acc.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/ee6acc.wgsl.expected.msl | 4 +- .../textureStore/ee6acc.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/ee6acc.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/ef9f2f.wgsl | 4 +- .../ef9f2f.wgsl.expected.dxc.hlsl | 4 +- .../ef9f2f.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/ef9f2f.wgsl.expected.glsl | 12 +-- .../var/textureStore/ef9f2f.wgsl.expected.msl | 4 +- .../textureStore/ef9f2f.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/ef9f2f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/f1e6d3.wgsl | 4 +- .../f1e6d3.wgsl.expected.dxc.hlsl | 4 +- .../f1e6d3.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/f1e6d3.wgsl.expected.glsl | 12 +-- .../var/textureStore/f1e6d3.wgsl.expected.msl | 4 +- .../textureStore/f1e6d3.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/f1e6d3.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/f8dead.wgsl | 4 +- .../f8dead.wgsl.expected.dxc.hlsl | 4 +- .../f8dead.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/f8dead.wgsl.expected.glsl | 12 +-- .../var/textureStore/f8dead.wgsl.expected.msl | 4 +- .../textureStore/f8dead.wgsl.expected.spvasm | 48 ++++++------ .../textureStore/f8dead.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/f9be83.wgsl | 4 +- .../f9be83.wgsl.expected.dxc.hlsl | 4 +- .../f9be83.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/f9be83.wgsl.expected.msl | 4 +- .../textureStore/f9be83.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/f9be83.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/fb9a8f.wgsl | 2 +- .../fb9a8f.wgsl.expected.dxc.hlsl | 2 +- .../fb9a8f.wgsl.expected.fxc.hlsl | 2 +- .../var/textureStore/fb9a8f.wgsl.expected.msl | 2 +- .../textureStore/fb9a8f.wgsl.expected.spvasm | 40 +++++----- .../textureStore/fb9a8f.wgsl.expected.wgsl | 2 +- .../builtins/gen/var/textureStore/fbf53f.wgsl | 4 +- .../fbf53f.wgsl.expected.dxc.hlsl | 4 +- .../fbf53f.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/fbf53f.wgsl.expected.glsl | 12 +-- .../var/textureStore/fbf53f.wgsl.expected.msl | 4 +- .../textureStore/fbf53f.wgsl.expected.spvasm | 60 ++++++++------- .../textureStore/fbf53f.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/fcbe66.wgsl | 4 +- .../fcbe66.wgsl.expected.dxc.hlsl | 4 +- .../fcbe66.wgsl.expected.fxc.hlsl | 4 +- .../var/textureStore/fcbe66.wgsl.expected.msl | 4 +- .../textureStore/fcbe66.wgsl.expected.spvasm | 47 ++++++------ .../textureStore/fcbe66.wgsl.expected.wgsl | 4 +- .../builtins/gen/var/textureStore/fd350c.wgsl | 4 +- .../fd350c.wgsl.expected.dxc.hlsl | 4 +- .../fd350c.wgsl.expected.fxc.hlsl | 4 +- .../textureStore/fd350c.wgsl.expected.glsl | 12 +-- .../var/textureStore/fd350c.wgsl.expected.msl | 4 +- .../textureStore/fd350c.wgsl.expected.spvasm | 63 +++++++-------- .../textureStore/fd350c.wgsl.expected.wgsl | 4 +- 5437 files changed, 24929 insertions(+), 23283 deletions(-) diff --git a/test/tint/builtins/gen/gen.wgsl.tmpl b/test/tint/builtins/gen/gen.wgsl.tmpl index f0cbd4a1ca..0dfe87949d 100644 --- a/test/tint/builtins/gen/gen.wgsl.tmpl +++ b/test/tint/builtins/gen/gen.wgsl.tmpl @@ -270,17 +270,17 @@ enable f16; {{- $float_value := $value }} {{- if not (Contains $value ".") }}{{$float_value = printf "%v." $value}}{{end}} {{- /* emit the value with any necessary suffixes */ -}} -{{- if eq $ty.Target.Name "i32" -}}{{$value}}i -{{- else if eq $ty.Target.Name "u32" -}}{{$value}}u -{{- else if eq $ty.Target.Name "f32" -}}{{$float_value}}f -{{- else if eq $ty.Target.Name "fa" -}}{{$float_value}} -{{- else if eq $ty.Target.Name "ia" -}}{{$value}} -{{- else if eq $ty.Target.Name "bool" -}}true -{{- else if eq $ty.Target.Name "vec" -}} -{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "Name" "" "TestValue" .TestValue }} +{{- if eq $ty.Target.Name "i32" -}}{{$value}}i +{{- else if eq $ty.Target.Name "u32" -}}{{$value}}u +{{- else if eq $ty.Target.Name "f32" -}}{{$float_value}}f +{{- else if eq $ty.Target.Name "fa" -}}{{$float_value}} +{{- else if eq $ty.Target.Name "ia" -}}{{$value}} +{{- else if eq $ty.Target.Name "bool" -}}true +{{- else if HasPrefix $ty.Target.Name "vec" -}} +{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "TestValue" .TestValue }} {{- template "Type" $ty}}({{$el}}) -{{- else if eq $ty.Target.Name "mat" -}}{{template "Type" $ty}}( -{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "Name" "" "TestValue" .TestValue }} +{{- else if HasPrefix $ty.Target.Name "mat" -}}{{template "Type" $ty}}( +{{- $el := Eval "ArgumentValue" "Type" (ElementType .Type) "TestValue" .TestValue }} {{- range $col := Iterate (index $ty.TemplateArguments 0) }} {{- range $row := Iterate (index $ty.TemplateArguments 1) }} {{- if or $col $row -}}, {{end}}{{$el}} @@ -297,18 +297,27 @@ enable f16; {{- /* ------------------------------------------------------------------ */ -}} {{- if IsType .Target -}} {{- if DeepestElementType . | IsAbstract -}} -{{- if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}} -{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}} -{{- else -}} -{{- end -}} -{{- else if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" (ElementType .)}}> -{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" (ElementType .)}}> -{{- else -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}} -{{- end -}} -{{- else if IsEnumEntry .Target -}}{{.Target.Name}} -{{- else if IsEnumMatcher .Target -}}{{(index .Target.Options 0).Name}} -{{- else -}} -{{- end -}} +{{- if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}} +{{- else if eq .Target.Name "vec2" -}}vec2 +{{- else if eq .Target.Name "vec3" -}}vec3 +{{- else if eq .Target.Name "vec4" -}}vec4 +{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}} +{{- else if HasPrefix .Target.Name "mat" -}}mat{{.Target.Name}} +{{- else -}} +{{- end -}} +{{- /* note: intrinsics.def has different type definitions for 'vec', + 'vec2', 'vec3'. Because of this we need to check whether the type + name is exactly 'vec' and 'mat' and if not, then look for the prefix. */ -}} +{{- else if eq .Target.Name "vec" -}}vec{{index .TemplateArguments 0}}<{{template "Type" (ElementType .)}}> +{{- else if eq .Target.Name "mat" -}}mat{{index .TemplateArguments 0}}x{{index .TemplateArguments 1}}<{{template "Type" (ElementType .)}}> +{{- else if HasPrefix .Target.Name "vec" -}}{{.Target.Name}}<{{template "Type" (ElementType .)}}> +{{- else if HasPrefix .Target.Name "mat" -}}{{.Target.Name}}<{{template "Type" (ElementType .)}}> +{{- else -}}{{.Target.Name}}{{template "TemplateArguments" .TemplateArguments}} +{{- end -}} +{{- else if IsEnumEntry .Target -}}{{.Target.Name}} +{{- else if IsEnumMatcher .Target -}}{{(index .Target.Options 0).Name}} +{{- else -}} +{{- end -}} {{- end -}} diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl index d99f749d64..7e13aabb93 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl @@ -23,7 +23,7 @@ // fn cross(vec3, vec3) -> vec3 fn cross_041cb0() { - var res: vec3 = cross(vec3(), vec3()); + var res: vec3 = cross(vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl index 36e4194fb1..b055c81467 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ void cross_041cb0() { - float3 res = cross((0.0f).xxx, (0.0f).xxx); + float3 res = cross((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl index 36e4194fb1..b055c81467 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ void cross_041cb0() { - float3 res = cross((0.0f).xxx, (0.0f).xxx); + float3 res = cross((1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl index b0e727f68d..e7b0ce31bb 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void cross_041cb0() { - vec3 res = cross(vec3(0.0f), vec3(0.0f)); + vec3 res = cross(vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void cross_041cb0() { - vec3 res = cross(vec3(0.0f), vec3(0.0f)); + vec3 res = cross(vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void cross_041cb0() { - vec3 res = cross(vec3(0.0f), vec3(0.0f)); + vec3 res = cross(vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl index 01500bb8d9..be5675fcdd 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void cross_041cb0() { - float3 res = cross(float3(0.0f), float3(0.0f)); + float3 res = cross(float3(1.0f), float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.spvasm index bad958c21a..07b9592244 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %16 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %20 = OpConstantNull %v3float + %21 = OpTypeFunction %v4float %cross_041cb0 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_v3float Function %16 - %13 = OpExtInst %v3float %15 Cross %16 %16 + %res = OpVariable %_ptr_Function_v3float Function %20 + %13 = OpExtInst %v3float %15 Cross %17 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %cross_041cb0 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %cross_041cb0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %cross_041cb0 + %29 = OpLabel + %30 = OpFunctionCall %void %cross_041cb0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %cross_041cb0 + %32 = OpLabel + %33 = OpFunctionCall %void %cross_041cb0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl index b4f3b74361..6928bca82f 100644 --- a/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cross/041cb0.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn cross_041cb0() { - var res : vec3 = cross(vec3(), vec3()); + var res : vec3 = cross(vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl index ba13074fbd..aaae266229 100644 --- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl +++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl @@ -25,7 +25,7 @@ enable f16; // fn cross(vec3, vec3) -> vec3 fn cross_9857cb() { - var res: vec3 = cross(vec3(), vec3()); + var res: vec3 = cross(vec3(f16()), vec3(f16())); } @vertex diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl index 2d151e84c9..f991031d6f 100644 --- a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl @@ -1,7 +1,7 @@ enable f16; fn cross_9857cb() { - var res : vec3 = cross(vec3(), vec3()); + var res : vec3 = cross(vec3(f16()), vec3(f16())); } @vertex diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl index 2b0e8d9a02..6786f51b45 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl @@ -23,7 +23,7 @@ // fn pack2x16float(vec2) -> u32 fn pack2x16float_0e97b3() { - var res: u32 = pack2x16float(vec2()); + var res: u32 = pack2x16float(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl index f142fb8a90..c3960d7f1c 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16float(float2 param_0) { } void pack2x16float_0e97b3() { - uint res = tint_pack2x16float((0.0f).xx); + uint res = tint_pack2x16float((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl index f142fb8a90..c3960d7f1c 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16float(float2 param_0) { } void pack2x16float_0e97b3() { - uint res = tint_pack2x16float((0.0f).xx); + uint res = tint_pack2x16float((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl index bedec1581a..56f778fe15 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack2x16float_0e97b3() { - uint res = packHalf2x16(vec2(0.0f)); + uint res = packHalf2x16(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pack2x16float_0e97b3() { - uint res = packHalf2x16(vec2(0.0f)); + uint res = packHalf2x16(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pack2x16float_0e97b3() { - uint res = packHalf2x16(vec2(0.0f)); + uint res = packHalf2x16(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl index d3c14f8965..5c528a2aef 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack2x16float_0e97b3() { - uint res = as_type(half2(float2(0.0f))); + uint res = as_type(half2(float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm index 257789ad47..8a0cd46321 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.spvasm @@ -33,27 +33,27 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2float = OpTypeVector %float 2 - %17 = OpConstantNull %v2float -%_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %21 = OpConstantNull %uint + %22 = OpTypeFunction %v4float %pack2x16float_0e97b3 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %20 - %13 = OpExtInst %uint %15 PackHalf2x16 %17 + %res = OpVariable %_ptr_Function_uint Function %21 + %13 = OpExtInst %uint %15 PackHalf2x16 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %pack2x16float_0e97b3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pack2x16float_0e97b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.wgsl index fca0987f93..966d268c9d 100644 --- a/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16float/0e97b3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack2x16float_0e97b3() { - var res : u32 = pack2x16float(vec2()); + var res : u32 = pack2x16float(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl index ba71668dc6..2fd8fa0d5e 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl @@ -23,7 +23,7 @@ // fn pack2x16snorm(vec2) -> u32 fn pack2x16snorm_6c169b() { - var res: u32 = pack2x16snorm(vec2()); + var res: u32 = pack2x16snorm(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl index cb5ec976da..97b0f208df 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16snorm(float2 param_0) { } void pack2x16snorm_6c169b() { - uint res = tint_pack2x16snorm((0.0f).xx); + uint res = tint_pack2x16snorm((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl index cb5ec976da..97b0f208df 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16snorm(float2 param_0) { } void pack2x16snorm_6c169b() { - uint res = tint_pack2x16snorm((0.0f).xx); + uint res = tint_pack2x16snorm((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl index 489de9709c..b7a10f92f0 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack2x16snorm_6c169b() { - uint res = packSnorm2x16(vec2(0.0f)); + uint res = packSnorm2x16(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pack2x16snorm_6c169b() { - uint res = packSnorm2x16(vec2(0.0f)); + uint res = packSnorm2x16(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pack2x16snorm_6c169b() { - uint res = packSnorm2x16(vec2(0.0f)); + uint res = packSnorm2x16(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl index 7c11475f4b..87aa18ef94 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack2x16snorm_6c169b() { - uint res = pack_float_to_snorm2x16(float2(0.0f)); + uint res = pack_float_to_snorm2x16(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm index c7b4a14e0e..05e4bea038 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.spvasm @@ -33,27 +33,27 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2float = OpTypeVector %float 2 - %17 = OpConstantNull %v2float -%_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %21 = OpConstantNull %uint + %22 = OpTypeFunction %v4float %pack2x16snorm_6c169b = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %20 - %13 = OpExtInst %uint %15 PackSnorm2x16 %17 + %res = OpVariable %_ptr_Function_uint Function %21 + %13 = OpExtInst %uint %15 PackSnorm2x16 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %pack2x16snorm_6c169b +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pack2x16snorm_6c169b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.wgsl index 0d9fafc4e4..6878ce5e67 100644 --- a/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16snorm/6c169b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack2x16snorm_6c169b() { - var res : u32 = pack2x16snorm(vec2()); + var res : u32 = pack2x16snorm(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl index 6a1bb6ae77..4850d211c5 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl @@ -23,7 +23,7 @@ // fn pack2x16unorm(vec2) -> u32 fn pack2x16unorm_0f08e4() { - var res: u32 = pack2x16unorm(vec2()); + var res: u32 = pack2x16unorm(vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl index 69b0a5f1d7..400d4ed71f 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16unorm(float2 param_0) { } void pack2x16unorm_0f08e4() { - uint res = tint_pack2x16unorm((0.0f).xx); + uint res = tint_pack2x16unorm((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl index 69b0a5f1d7..400d4ed71f 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16unorm(float2 param_0) { } void pack2x16unorm_0f08e4() { - uint res = tint_pack2x16unorm((0.0f).xx); + uint res = tint_pack2x16unorm((1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl index ee5df00c16..c1d22aa913 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack2x16unorm_0f08e4() { - uint res = packUnorm2x16(vec2(0.0f)); + uint res = packUnorm2x16(vec2(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pack2x16unorm_0f08e4() { - uint res = packUnorm2x16(vec2(0.0f)); + uint res = packUnorm2x16(vec2(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pack2x16unorm_0f08e4() { - uint res = packUnorm2x16(vec2(0.0f)); + uint res = packUnorm2x16(vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl index 5661b9829f..1d2e143b4a 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack2x16unorm_0f08e4() { - uint res = pack_float_to_unorm2x16(float2(0.0f)); + uint res = pack_float_to_unorm2x16(float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm index ca7368c096..cd23181015 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.spvasm @@ -33,27 +33,27 @@ %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2float = OpTypeVector %float 2 - %17 = OpConstantNull %v2float -%_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %21 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %18 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %21 = OpConstantNull %uint + %22 = OpTypeFunction %v4float %pack2x16unorm_0f08e4 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %20 - %13 = OpExtInst %uint %15 PackUnorm2x16 %17 + %res = OpVariable %_ptr_Function_uint Function %21 + %13 = OpExtInst %uint %15 PackUnorm2x16 %18 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %pack2x16unorm_0f08e4 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %pack2x16unorm_0f08e4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.wgsl index 0ddd089276..dbec285134 100644 --- a/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack2x16unorm/0f08e4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack2x16unorm_0f08e4() { - var res : u32 = pack2x16unorm(vec2()); + var res : u32 = pack2x16unorm(vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl index 11e2e1fc08..085bb2daab 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl @@ -23,7 +23,7 @@ // fn pack4x8snorm(vec4) -> u32 fn pack4x8snorm_4d22e7() { - var res: u32 = pack4x8snorm(vec4()); + var res: u32 = pack4x8snorm(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl index 073431c94a..c1480e74b5 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8snorm(float4 param_0) { } void pack4x8snorm_4d22e7() { - uint res = tint_pack4x8snorm((0.0f).xxxx); + uint res = tint_pack4x8snorm((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl index 073431c94a..c1480e74b5 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8snorm(float4 param_0) { } void pack4x8snorm_4d22e7() { - uint res = tint_pack4x8snorm((0.0f).xxxx); + uint res = tint_pack4x8snorm((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl index a61b9cbed1..30deb2644d 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack4x8snorm_4d22e7() { - uint res = packSnorm4x8(vec4(0.0f)); + uint res = packSnorm4x8(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pack4x8snorm_4d22e7() { - uint res = packSnorm4x8(vec4(0.0f)); + uint res = packSnorm4x8(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pack4x8snorm_4d22e7() { - uint res = packSnorm4x8(vec4(0.0f)); + uint res = packSnorm4x8(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl index 5af9d4b544..fb2a04bb6c 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack4x8snorm_4d22e7() { - uint res = pack_float_to_snorm4x8(float4(0.0f)); + uint res = pack_float_to_snorm4x8(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.spvasm index 34bcbe27a6..cae0cc4518 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 -%_ptr_Function_uint = OpTypePointer Function %uint - %18 = OpConstantNull %uint - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %20 = OpConstantNull %uint + %21 = OpTypeFunction %v4float %pack4x8snorm_4d22e7 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %18 - %13 = OpExtInst %uint %15 PackSnorm4x8 %5 + %res = OpVariable %_ptr_Function_uint Function %20 + %13 = OpExtInst %uint %15 PackSnorm4x8 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %pack4x8snorm_4d22e7 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %pack4x8snorm_4d22e7 + %29 = OpLabel + %30 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pack4x8snorm_4d22e7 + %32 = OpLabel + %33 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl index bb4d5a2e8f..1ff4946880 100644 --- a/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8snorm/4d22e7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack4x8snorm_4d22e7() { - var res : u32 = pack4x8snorm(vec4()); + var res : u32 = pack4x8snorm(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl index ed9074ab3d..d130a03c14 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl @@ -23,7 +23,7 @@ // fn pack4x8unorm(vec4) -> u32 fn pack4x8unorm_95c456() { - var res: u32 = pack4x8unorm(vec4()); + var res: u32 = pack4x8unorm(vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl index a4e6e76756..34537aa9f2 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8unorm(float4 param_0) { } void pack4x8unorm_95c456() { - uint res = tint_pack4x8unorm((0.0f).xxxx); + uint res = tint_pack4x8unorm((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl index a4e6e76756..34537aa9f2 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8unorm(float4 param_0) { } void pack4x8unorm_95c456() { - uint res = tint_pack4x8unorm((0.0f).xxxx); + uint res = tint_pack4x8unorm((1.0f).xxxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl index 29d5585a43..826c904d1b 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack4x8unorm_95c456() { - uint res = packUnorm4x8(vec4(0.0f)); + uint res = packUnorm4x8(vec4(1.0f)); } vec4 vertex_main() { @@ -21,7 +21,7 @@ void main() { precision mediump float; void pack4x8unorm_95c456() { - uint res = packUnorm4x8(vec4(0.0f)); + uint res = packUnorm4x8(vec4(1.0f)); } void fragment_main() { @@ -35,7 +35,7 @@ void main() { #version 310 es void pack4x8unorm_95c456() { - uint res = packUnorm4x8(vec4(0.0f)); + uint res = packUnorm4x8(vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl index be93a802ed..96f61caa5f 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack4x8unorm_95c456() { - uint res = pack_float_to_unorm4x8(float4(0.0f)); + uint res = pack_float_to_unorm4x8(float4(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.spvasm index 69e8a3f1bb..410e72e1aa 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 34 ; Schema: 0 OpCapability Shader %15 = OpExtInstImport "GLSL.std.450" @@ -32,36 +32,37 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %uint = OpTypeInt 32 0 -%_ptr_Function_uint = OpTypePointer Function %uint - %18 = OpConstantNull %uint - %19 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %17 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_uint = OpTypePointer Function %uint + %20 = OpConstantNull %uint + %21 = OpTypeFunction %v4float %pack4x8unorm_95c456 = OpFunction %void None %9 %12 = OpLabel - %res = OpVariable %_ptr_Function_uint Function %18 - %13 = OpExtInst %uint %15 PackUnorm4x8 %5 + %res = OpVariable %_ptr_Function_uint Function %20 + %13 = OpExtInst %uint %15 PackUnorm4x8 %17 OpStore %res %13 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %19 - %21 = OpLabel - %22 = OpFunctionCall %void %pack4x8unorm_95c456 +%vertex_main_inner = OpFunction %v4float None %21 + %23 = OpLabel + %24 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %24 = OpLabel - %25 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %25 + %26 = OpLabel + %27 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %27 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %void %pack4x8unorm_95c456 + %29 = OpLabel + %30 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pack4x8unorm_95c456 + %32 = OpLabel + %33 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl index 1aca6f3027..9b6adee6cf 100644 --- a/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/pack4x8unorm/95c456.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack4x8unorm_95c456() { - var res : u32 = pack4x8unorm(vec4()); + var res : u32 = pack4x8unorm(vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl index 43f2d69e01..3641e750f5 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_0166ec() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl index d830838919..6d68bcb056 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_0166ec() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl index d830838919..6d68bcb056 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_0166ec() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl index 4c7cbf869f..51c3eceeed 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl index 71d13186f7..1c68ab7125 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_0166ec(texturecube tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm index 0604de6dc9..783c096c6a 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.spvasm @@ -46,32 +46,32 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %textureGather_0166ec = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %32 + %res = OpVariable %_ptr_Function_v4int Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %uint_1 + %20 = OpImageGather %v4int %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_0166ec +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_0166ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl index 0ed3403dd8..8e2b64c148 100644 --- a/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/0166ec.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_0166ec() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl index fa8bb16ce9..ed3f46c33f 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_04fa78() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1u); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl index ab6b555aa8..74e06a31fb 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_04fa78() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl index ab6b555aa8..74e06a31fb 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_04fa78() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl index 567f692061..e2de24c1e0 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_04fa78(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm index ea71a5e840..e22ebf7dd5 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 52 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,44 +46,48 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4int + %39 = OpTypeFunction %v4float %textureGather_04fa78 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %33 + %res = OpVariable %_ptr_Function_v4int Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %30 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_04fa78 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_04fa78 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_04fa78 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_04fa78 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_04fa78 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_04fa78 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl index 4d93ff5ca6..0e5395524b 100644 --- a/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/04fa78.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_04fa78() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1u); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl index ab254c7caa..d913365243 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_10c554() { - var res: vec4 = textureGather(arg_0, arg_1, vec3()); + var res: vec4 = textureGather(arg_0, arg_1, vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl index 2507fcee71..961fbcdb60 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_10c554() { - float4 res = arg_0.Gather(arg_1, (0.0f).xxx); + float4 res = arg_0.Gather(arg_1, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl index 2507fcee71..961fbcdb60 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_10c554() { - float4 res = arg_0.Gather(arg_1, (0.0f).xxx); + float4 res = arg_0.Gather(arg_1, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl index 47d056baca..8efbbef254 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 0.0); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl index c3f13c1ea4..1c70a63f7f 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_10c554(depthcube tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm index 44cf7b12ab..1054b44297 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.spvasm @@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_10c554 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_0 + %19 = OpImageGather %v4float %23 %26 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_10c554 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_10c554 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl index a4a17cb0fd..b4c068dbbc 100644 --- a/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/10c554.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_10c554() { - var res : vec4 = textureGather(arg_0, arg_1, vec3()); + var res : vec4 = textureGather(arg_0, arg_1, vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl index 91d42e6157..27c181dcd8 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_11b2db() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl index 2a83a5c58b..7f5a7649b7 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_11b2db() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl index 2a83a5c58b..7f5a7649b7 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_11b2db() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl index 9e24c71811..a3ee0b8591 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl index 759ae4a71a..900c473817 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_11b2db(texturecube tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm index 2a4f5dd858..d86ecebfc3 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.spvasm @@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_11b2db = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %uint_1 + %19 = OpImageGather %v4float %23 %26 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_11b2db +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_11b2db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl index f4c60b3e79..4598046334 100644 --- a/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/11b2db.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_11b2db() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl index 0f6d84c214..b98fda0209 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_17baac() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl index d61645cd60..686fcaed8c 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_17baac() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl index d61645cd60..686fcaed8c 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_17baac() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl index e1809467c0..1546cc1e57 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl index 57413314ed..bf7e8af2f9 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_17baac(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm index 7734feca27..b909cdbf76 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_17baac = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_17baac +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_17baac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_17baac - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureGather_17baac OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_17baac + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl index 9735392934..a50cddd560 100644 --- a/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/17baac.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_17baac() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl index f4d677fd40..6c58f77524 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_1bf0ab() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl index 07ebb25541..e5ae6c4ea6 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_1bf0ab() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl index 07ebb25541..e5ae6c4ea6 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_1bf0ab() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl index fa40fb19c6..bd3941d7c4 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl index 8d68ceab29..b498c16a6d 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_1bf0ab(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm index c3a739ea95..bf4b03fc38 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,43 +46,46 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4uint + %38 = OpTypeFunction %v4float %textureGather_1bf0ab = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %33 + %res = OpVariable %_ptr_Function_v4uint Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_1bf0ab +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_1bf0ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_1bf0ab - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %46 = OpLabel %47 = OpFunctionCall %void %textureGather_1bf0ab OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_1bf0ab + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl index a909adebcf..1f2011a8ba 100644 --- a/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1bf0ab.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_1bf0ab() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl index c577b44296..1a5f70d00d 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_1f7f6b() { - var res: vec4 = textureGather(arg_0, arg_1, vec2(), vec2()); + var res: vec4 = textureGather(arg_0, arg_1, vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl index 287fd65c39..6ca6ff883a 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_1f7f6b() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl index 287fd65c39..6ca6ff883a 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_1f7f6b() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl index e76e72816a..3ca8a1512b 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 0.0, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl index a861581165..0ad58f00d4 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_1f7f6b(depth2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm index e4a034cce6..874d548817 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,44 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %34 = OpTypeFunction %v4float %textureGather_1f7f6b = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_0 ConstOffset %29 + %19 = OpImageGather %v4float %23 %26 %int_0 ConstOffset %31 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_1f7f6b +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_1f7f6b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_1f7f6b + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_1f7f6b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_1f7f6b + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_1f7f6b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl index 0c466e9c20..3a3e2cf90c 100644 --- a/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/1f7f6b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_1f7f6b() { - var res : vec4 = textureGather(arg_0, arg_1, vec2(), vec2()); + var res : vec4 = textureGather(arg_0, arg_1, vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl index ba2383ebe3..0e2c97ab88 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_22e930() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl index ad228813d2..dadcc9e1c8 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_22e930() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl index ad228813d2..dadcc9e1c8 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_22e930() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl index 79022b758b..56ebbfc93f 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl index b432609d49..11278d62e1 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_22e930(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm index 327eac55d0..4e541a168e 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_22e930 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_22e930 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_22e930 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_22e930 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %44 = OpLabel %45 = OpFunctionCall %void %textureGather_22e930 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_22e930 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl index 41ad3bba77..6e8f47d35f 100644 --- a/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/22e930.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_22e930() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl index 8af90402cb..bdfac2c0db 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_238ec4() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl index 5a96bada45..e3fe82cae0 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_238ec4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl index 5a96bada45..e3fe82cae0 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_238ec4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl index 43df0a43b9..b45b48ab19 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl index 32e3b88bdb..b1026d2204 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_238ec4(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm index a637fed82a..f2bc0de182 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureGather_238ec4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_238ec4 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_238ec4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_238ec4 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_238ec4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_238ec4 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_238ec4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl index 37d03446a7..e985158b5b 100644 --- a/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/238ec4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_238ec4() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl index 7d9468ca8d..f922b9c5a1 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_24b0bd() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl index 68596e19a3..c543616763 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_24b0bd() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl index 68596e19a3..c543616763 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_24b0bd() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl index ee71f66638..3c0d2c4b4a 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl index 0cc11c32cd..17bd3dd37a 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_24b0bd(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm index a3a420b284..2e9a562ff5 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_24b0bd = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_24b0bd +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_24b0bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_24b0bd - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureGather_24b0bd OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_24b0bd + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl index 46c8b4da97..2c74356e96 100644 --- a/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/24b0bd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_24b0bd() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl index 38fb0513d3..430edb89cc 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_269250() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl index 844cf7115a..65a7bcc9cc 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_269250() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl index 844cf7115a..65a7bcc9cc 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_269250() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl index 73f7dc6c64..b22da1b056 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl index d7c68bc7e8..61afc235bd 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_269250(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm index f88bf309bc..38906b3fba 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,47 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4int + %39 = OpTypeFunction %v4float %textureGather_269250 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_269250 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_269250 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_269250 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %47 = OpLabel %48 = OpFunctionCall %void %textureGather_269250 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_269250 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl index 7c75febcda..c1431e4843 100644 --- a/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/269250.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_269250() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl index 99474a2ee1..f678a5b1c1 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_2a4f40() { - var res: vec4 = textureGather(arg_0, arg_1, vec2(), 1u); + var res: vec4 = textureGather(arg_0, arg_1, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl index 334a85f04d..9db6f8f90c 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2a4f40() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl index 334a85f04d..9db6f8f90c 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2a4f40() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl index 5e67696001..84872c93fc 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl index ac60335ad3..a64731605b 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_2a4f40(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm index a6f0405bdc..ffc18d5954 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_2a4f40 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_2a4f40 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_2a4f40 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_2a4f40 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureGather_2a4f40 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_2a4f40 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl index 89388ed138..bc6a8c0aa2 100644 --- a/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2a4f40.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_2a4f40() { - var res : vec4 = textureGather(arg_0, arg_1, vec2(), 1u); + var res : vec4 = textureGather(arg_0, arg_1, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl index fba78db623..afa270a45b 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_2cc066() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl index 222acf566e..01eef68f1b 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_2cc066() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl index 222acf566e..01eef68f1b 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_2cc066() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl index 7c6c1331a1..906dd13163 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl index fa0531a389..9c27e694c6 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_2cc066(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm index a931db1de4..b8f593802b 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,47 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4uint + %39 = OpTypeFunction %v4float %textureGather_2cc066 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_2cc066 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_2cc066 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_2cc066 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %47 = OpLabel %48 = OpFunctionCall %void %textureGather_2cc066 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_2cc066 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl index 318f9103e4..9f71bf4701 100644 --- a/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2cc066.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_2cc066() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl index d73af28c5d..410adfd9da 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_2e0ed5() { - var res: vec4 = textureGather(arg_0, arg_1, vec2()); + var res: vec4 = textureGather(arg_0, arg_1, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl index e1a5741735..1da303c553 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2e0ed5() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl index e1a5741735..1da303c553 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2e0ed5() { - float4 res = arg_0.Gather(arg_1, (0.0f).xx); + float4 res = arg_0.Gather(arg_1, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl index 8eca46c7b7..c4b7932048 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 0.0); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl index 9ae7410e33..646efa00fe 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_2e0ed5(depth2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm index 01705820a4..f787563d57 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.spvasm @@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_2e0ed5 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_0 + %19 = OpImageGather %v4float %23 %26 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_2e0ed5 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_2e0ed5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl index 4b2a82c681..94df481bf3 100644 --- a/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/2e0ed5.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_2e0ed5() { - var res : vec4 = textureGather(arg_0, arg_1, vec2()); + var res : vec4 = textureGather(arg_0, arg_1, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl index 8bbf3b2a57..de80564442 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_32c4e8() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl index ce7b157547..ce85f35bca 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_32c4e8() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl index ce7b157547..ce85f35bca 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_32c4e8() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl index 3b5504b9c1..bf84c6c061 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl index 4553861a55..7a9044f5dd 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_32c4e8(texturecube tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm index f2cc29704e..080c3f86ce 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.spvasm @@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_32c4e8 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_1 + %19 = OpImageGather %v4float %23 %26 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_32c4e8 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_32c4e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl index d67ff728b8..f32d23bab4 100644 --- a/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/32c4e8.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_32c4e8() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl index 2abaafea6a..a03abf836d 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_3b32cc() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl index 4fe9dd1470..b018cb766a 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_3b32cc() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl index 4fe9dd1470..b018cb766a 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_3b32cc() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl index 38d117622e..4860102b25 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl index 864d36cf9f..5f4d892b17 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_3b32cc(texturecube tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm index 829beb2df2..7144ab23a9 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.spvasm @@ -46,32 +46,32 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %textureGather_3b32cc = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %32 + %res = OpVariable %_ptr_Function_v4uint Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %int_1 + %20 = OpImageGather %v4uint %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_3b32cc +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_3b32cc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl index 0358d14df4..bcee7c08b7 100644 --- a/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/3b32cc.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_3b32cc() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl index e8221d5ed3..23b0ac9537 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_43025d() { - var res: vec4 = textureGather(arg_0, arg_1, vec3(), 1i); + var res: vec4 = textureGather(arg_0, arg_1, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl index 703fd77ec7..e38f9d9831 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_43025d() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl index 703fd77ec7..e38f9d9831 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_43025d() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl index 0867050d11..0ecacb7a40 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_43025d(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm index a8ef14e6cc..d72e46f24d 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,44 +44,48 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpTypeFunction %v4float %textureGather_43025d = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_43025d +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_43025d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_43025d + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_43025d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_43025d + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_43025d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl index 27be3fd7c4..d249e2d688 100644 --- a/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/43025d.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_43025d() { - var res : vec4 = textureGather(arg_0, arg_1, vec3(), 1i); + var res : vec4 = textureGather(arg_0, arg_1, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl index 2ad15134ac..e8637bf294 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_445793() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl index 286350fd59..d88812f02d 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_445793() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl index 286350fd59..d88812f02d 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_445793() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl index a39af11dbd..5e342a1212 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl index a194b15600..234f3f1155 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_445793(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm index 4af17b339f..5166bb9b8a 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_445793 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %35 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_445793 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_445793 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_445793 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %48 = OpLabel %49 = OpFunctionCall %void %textureGather_445793 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_445793 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl index 93e20cab3e..c677b36df7 100644 --- a/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/445793.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_445793() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl index 633899dc65..56731bab41 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_49b07f() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl index b70c4827dd..e0d34b9d55 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_49b07f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl index b70c4827dd..e0d34b9d55 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_49b07f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl index fbcc858c58..2c332d1fed 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl index 3f485b49d0..771a89a694 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_49b07f(texture2d tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm index 74778200f2..f0b9b75347 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.spvasm @@ -46,34 +46,34 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %textureGather_49b07f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %35 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %int_1 ConstOffset %31 + %20 = OpImageGather %v4uint %25 %28 %int_1 ConstOffset %32 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_49b07f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_49b07f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl index 19cf11b852..929e797eed 100644 --- a/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/49b07f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_49b07f() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl index b88180b8d8..cbde49230f 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_4b8103() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl index 3a7dca0279..8baf1a6d4e 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4b8103() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl index 3a7dca0279..8baf1a6d4e 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4b8103() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl index 2eeca6e86e..36dd8312a8 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl index f1604b9054..55dd24f627 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_4b8103(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm index d995343f5a..6c4365dfdf 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_4b8103 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 ConstOffset %31 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 ConstOffset %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_4b8103 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_4b8103 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_4b8103 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureGather_4b8103 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_4b8103 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl index ad5a5a3cf1..9c9e1be387 100644 --- a/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4b8103.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_4b8103() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl index 974421cd0b..135d996e2c 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_4e8ac5() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl index 9c993bb1a4..432c44102c 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4e8ac5() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl index 9c993bb1a4..432c44102c 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4e8ac5() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl index 849530456a..c655ed38fa 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl index 41a55ca012..897cfde019 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_4e8ac5(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm index c7ac20a285..8f9858a1b4 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_4e8ac5 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %35 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_4e8ac5 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_4e8ac5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_4e8ac5 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %48 = OpLabel %49 = OpFunctionCall %void %textureGather_4e8ac5 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_4e8ac5 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl index 20cd25ba9c..2743c6bfc1 100644 --- a/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/4e8ac5.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_4e8ac5() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl index db02a445e2..1de19ec992 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_5266da() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl index a616ea774a..751ee8fe57 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5266da() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl index a616ea774a..751ee8fe57 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5266da() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl index 9bc3a2832d..a9d6fe25ff 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl index 2082f6a54b..82d7886f18 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_5266da(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm index 51c672ed6b..967977413c 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.spvasm @@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_5266da = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_1 + %19 = OpImageGather %v4float %23 %26 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_5266da +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_5266da OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl index 8db0a99dff..e9724b2812 100644 --- a/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5266da.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_5266da() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl index afea32f1cb..8c5306ca12 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_59372a() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl index 677a3564ef..2670088f5e 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_59372a() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl index 677a3564ef..2670088f5e 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_59372a() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl index dd6f659e6a..dd7eeaead8 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl index 13183a85cd..b0498a874e 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_59372a(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm index 5a520aa1b2..2e92199c9a 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureGather_59372a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_1 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_59372a +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_59372a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_59372a - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %48 = OpLabel %49 = OpFunctionCall %void %textureGather_59372a OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_59372a + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl index e558dea371..bf9b38b0a9 100644 --- a/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/59372a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_59372a() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl index c4a4e35bae..006429c902 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_5ba85f() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl index 4a550ea27a..26e6bd9f4f 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5ba85f() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl index 4a550ea27a..26e6bd9f4f 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5ba85f() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl index fcb3cf832b..87ae300d37 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(1.0f), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl index d0ae48190b..3f921541b8 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_5ba85f(texturecube tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm index 29ef2a4c28..6b26297081 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.spvasm @@ -46,31 +46,31 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %31 = OpConstantNull %v4int - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %textureGather_5ba85f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %31 + %res = OpVariable %_ptr_Function_v4int Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %int_1 + %20 = OpImageGather %v4int %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_5ba85f +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_5ba85f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl index b25e3f8670..8a37d05a10 100644 --- a/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5ba85f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_5ba85f() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl index 3205508e40..ccf42047ef 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_5bd491() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl index 6c830b8246..701563d00a 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5bd491() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl index 6c830b8246..701563d00a 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5bd491() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl index d96776aaf6..81b595dfaf 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl index 2b48ea550b..00e6bf53dc 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_5bd491(texture2d tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm index b22abf0ef8..311512aa6d 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.spvasm @@ -46,32 +46,32 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %textureGather_5bd491 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %32 + %res = OpVariable %_ptr_Function_v4uint Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %int_1 + %20 = OpImageGather %v4uint %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_5bd491 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_5bd491 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl index 164ec7c14f..e29865d1d1 100644 --- a/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/5bd491.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_5bd491() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl index e714724145..4bdd2e8b66 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_6b7b74() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl index 18c09770db..e304da8387 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_6b7b74() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl index 18c09770db..e304da8387 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_6b7b74() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl index 990088c4a5..96fabc074f 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl index 21aefeba05..2de79ed00e 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_6b7b74(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm index 7e7f3ebd64..6e2a3993d1 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,46 +46,50 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %36 = OpConstantNull %v4uint - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4uint + %42 = OpTypeFunction %v4float %textureGather_6b7b74 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %36 + %res = OpVariable %_ptr_Function_v4uint Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %uint_1 ConstOffset %33 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureGather_6b7b74 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_6b7b74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_6b7b74 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_6b7b74 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_6b7b74 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_6b7b74 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl index 3cc51603dc..92e7d145fd 100644 --- a/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/6b7b74.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_6b7b74() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl index 20e52269a1..3d5cc893f0 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_751f8a() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1i); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl index 3f07457516..07496e0b24 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_751f8a() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl index 3f07457516..07496e0b24 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_751f8a() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl index 2fbbc1a5b1..2837f2e4be 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_751f8a(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm index 39748135db..787d887ec0 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_751f8a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureGather_751f8a +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_751f8a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_751f8a + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_751f8a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_751f8a + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_751f8a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl index 7cda70f19f..9e29ed7562 100644 --- a/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/751f8a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_751f8a() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1i); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl index da9987d541..819e6faa6f 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_788010() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1u); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl index daf38ede78..f7d95cb8cb 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_788010() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl index daf38ede78..f7d95cb8cb 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_788010() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl index 92a80cfd0a..ec066cf448 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_788010(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm index c6997071d1..7540d0c104 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_788010 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %30 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_788010 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_788010 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_788010 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_788010 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_788010 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_788010 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl index dec67b9d80..2f6772e0d3 100644 --- a/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/788010.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_788010() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1u); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl index 24c4da3e54..942ae7e55f 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_7c3828() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl index 5efb022606..928f915406 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_7c3828() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl index 5efb022606..928f915406 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_7c3828() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl index 6fcedbf362..1f826f7561 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl index a8134ee6fc..3b709aeadd 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_7c3828(texture2d tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm index 1e1f646e94..bb909ba483 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.spvasm @@ -46,33 +46,33 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %30 = OpConstantNull %v2int + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %34 = OpConstantNull %v4int + %35 = OpTypeFunction %v4float %textureGather_7c3828 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %33 + %res = OpVariable %_ptr_Function_v4int Function %34 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %int_1 ConstOffset %30 + %20 = OpImageGather %v4int %25 %28 %int_1 ConstOffset %31 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_7c3828 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_7c3828 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl index 339b0ad8de..05b6166a04 100644 --- a/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7c3828.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_7c3828() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl index 6943197c6a..575556c745 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_7dd226() { - var res: vec4 = textureGather(arg_0, arg_1, vec3(), 1u); + var res: vec4 = textureGather(arg_0, arg_1, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl index 30437f7e69..29a4129d35 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_7dd226() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl index 30437f7e69..29a4129d35 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_7dd226() { - float4 res = arg_0.Gather(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Gather(arg_1, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl index 76771fb002..ab93c24375 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_7dd226(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm index fe1525634e..0c4fda921c 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_7dd226 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_7dd226 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_7dd226 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_7dd226 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_7dd226 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_7dd226 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_7dd226 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl index d112afcdf2..e178ec2e99 100644 --- a/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/7dd226.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_7dd226() { - var res : vec4 = textureGather(arg_0, arg_1, vec3(), 1u); + var res : vec4 = textureGather(arg_0, arg_1, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl index be8e1e58c9..1dfa2dfacc 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_829357() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1u); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl index f9d311400b..0fae1e0556 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_829357() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl index f9d311400b..0fae1e0556 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_829357() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl index d71c6ff483..b76776c63a 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_829357(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm index ee1c7cc237..c7ffbfb41b 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_829357 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %int_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_829357 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_829357 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_829357 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_829357 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_829357 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_829357 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl index f7c7885553..713468b668 100644 --- a/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/829357.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_829357() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1u); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl index 26bbdfe0fc..2e2622806b 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_831549() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl index b4df239bcc..892b4f3d46 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_831549() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl index b4df239bcc..892b4f3d46 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_831549() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl index 49e6ad0a22..dabc82dfc1 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl index 5f2d88074b..73533b3d0f 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_831549(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm index bba13c2afb..709654fa0b 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureGather_831549 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_831549 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_831549 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_831549 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %48 = OpLabel %49 = OpFunctionCall %void %textureGather_831549 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_831549 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl index 45ab25d453..35d382c678 100644 --- a/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/831549.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_831549() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl index 75f0ea36c2..be40a06272 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_8578bc() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1u); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl index 3d08469898..0b8ccbec28 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8578bc() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl index 3d08469898..0b8ccbec28 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8578bc() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl index d54ba7e676..5484cbc2ca 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_8578bc(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm index 9eb633a3ec..efca13c988 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_8578bc = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %uint_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureGather_8578bc +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_8578bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_8578bc + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_8578bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_8578bc + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_8578bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl index d43d26bdda..1b8d833b94 100644 --- a/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8578bc.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_8578bc() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1u); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl index 8455ecee0d..128b112fe4 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_89680f() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl index 752cd0d759..9993543ab4 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_89680f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl index 752cd0d759..9993543ab4 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_89680f() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xxx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl index bccb5d22ab..5d7428ea92 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(1.0f), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl index c7d2c10ba7..cd3b77f3d2 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_89680f(texturecube tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm index 0c208ecd9c..6a811a6c1f 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.spvasm @@ -46,31 +46,31 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %27 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %31 = OpConstantNull %v4uint - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %textureGather_89680f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %31 + %res = OpVariable %_ptr_Function_v4uint Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %uint_1 + %20 = OpImageGather %v4uint %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_89680f +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_89680f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl index aeffaac372..d9f97fb62a 100644 --- a/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/89680f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_89680f() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl index acc65aeff8..dfc7f374f9 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_8b754c() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl index f8ffc7c726..09bd5ec5a4 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8b754c() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl index f8ffc7c726..09bd5ec5a4 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8b754c() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl index deec62c53b..2205065576 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - ivec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), 1); + ivec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl index 2bd2f19a7c..55d478dc79 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_8b754c(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm index 97669769ec..b47c0d71e8 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,43 +46,46 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4int + %38 = OpTypeFunction %v4float %textureGather_8b754c = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %33 + %res = OpVariable %_ptr_Function_v4int Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_8b754c +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_8b754c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_8b754c - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %46 = OpLabel %47 = OpFunctionCall %void %textureGather_8b754c OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_8b754c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl index 9ff5d7755a..8f8d037301 100644 --- a/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8b754c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_8b754c() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl index b30fcdcc1f..c0a8d2b5b4 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_8fae00() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl index f973d36cbb..309ca1d463 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8fae00() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl index f973d36cbb..309ca1d463 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8fae00() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl index 4b9c91a380..d3e13cb7f7 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - uvec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl index c1ea9fbee3..1bcc7c4497 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_8fae00(texture2d tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm index 40ae1c5d52..aa7bf7f71a 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.spvasm @@ -46,31 +46,31 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %31 = OpConstantNull %v4uint - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %textureGather_8fae00 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %31 + %res = OpVariable %_ptr_Function_v4uint Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %uint_1 + %20 = OpImageGather %v4uint %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_8fae00 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_8fae00 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl index be62d13495..272f02ce1b 100644 --- a/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/8fae00.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_8fae00() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl index aa35c72373..ffa5d1b0ef 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_92ea47() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl index a5de000f30..94fb7b7e33 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_92ea47() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl index a5de000f30..94fb7b7e33 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_92ea47() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl index 33de790fc7..4990c83f73 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), int(1u)); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl index f6c3e37604..00eb725300 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_92ea47(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm index 48e9c34973..52d822118b 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %35 = OpConstantNull %v4uint - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_92ea47 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %35 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %uint_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_92ea47 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_92ea47 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_92ea47 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %48 = OpLabel %49 = OpFunctionCall %void %textureGather_92ea47 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_92ea47 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl index 501d2df5cf..945fa529c2 100644 --- a/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/92ea47.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_92ea47() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl index 3d12e5428a..10ccd14ffc 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_986700() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl index 33d49eb79f..55c1085e99 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_986700() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl index 33d49eb79f..55c1085e99 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_986700() { - uint4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl index 4930539636..022cc38fe7 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl index 27a6430e3f..c91ad749fc 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_986700(texture2d tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm index 06737d336e..d0e948ebce 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,45 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %33 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4uint + %37 = OpTypeFunction %v4float %textureGather_986700 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %36 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4uint %25 %27 %uint_1 ConstOffset %31 + %20 = OpImageGather %v4uint %25 %28 %uint_1 ConstOffset %33 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_986700 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_986700 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_986700 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_986700 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_986700 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_986700 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl index ebf125e8aa..b1c49030fd 100644 --- a/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/986700.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_986700() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl index 06ca1b8dd9..b0f60e59d9 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_9a6358() { - var res: vec4 = textureGather(arg_0, arg_1, vec2(), 1i); + var res: vec4 = textureGather(arg_0, arg_1, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl index 57f3d15ce6..a53f003520 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_9a6358() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl index 57f3d15ce6..a53f003520 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_9a6358() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl index ba47d8f7b5..7c2be9a2e0 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl index b6f9f6857f..574220fef5 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_9a6358(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.spvasm index 138fef1387..e6c0a1ae7f 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,44 +44,47 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpTypeFunction %v4float %textureGather_9a6358 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_9a6358 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_9a6358 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_9a6358 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %45 = OpLabel %46 = OpFunctionCall %void %textureGather_9a6358 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_9a6358 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl index f55dba10f1..866c99c928 100644 --- a/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9a6358.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_9a6358() { - var res : vec4 = textureGather(arg_0, arg_1, vec2(), 1i); + var res : vec4 = textureGather(arg_0, arg_1, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl index 5cc0342107..cccf58337a 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_9ab41e() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl index d13137ca23..b2d02d99ca 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_9ab41e() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl index d13137ca23..b2d02d99ca 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_9ab41e() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl index a6d26d4b61..3c8c9f0ac8 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl index 3af8f5c5b3..b46b1b48d5 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_9ab41e(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm index d9af9f6834..aeefee6e3b 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %37 = OpConstantNull %v4int - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4int + %42 = OpTypeFunction %v4float %textureGather_9ab41e = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %37 + %res = OpVariable %_ptr_Function_v4int Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %uint_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_9ab41e +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_9ab41e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_9ab41e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %50 = OpLabel %51 = OpFunctionCall %void %textureGather_9ab41e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_9ab41e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl index 71d70bf9e2..db129e41b5 100644 --- a/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/9ab41e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_9ab41e() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl index 16deb127ce..09c36d8a29 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_a0372b() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl index aac3174059..1b83181d35 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_a0372b() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl index aac3174059..1b83181d35 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_a0372b() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl index 5be694be69..ace0fafe53 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - uvec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), 1); + uvec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl index 2e34b907f9..53c065b1d7 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_a0372b(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm index d90e3ce234..70fd385156 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %35 = OpConstantNull %v4uint - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_a0372b = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %35 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %int_1 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_a0372b +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_a0372b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_a0372b - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %48 = OpLabel %49 = OpFunctionCall %void %textureGather_a0372b OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_a0372b + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl index cb4dd681d0..13b48f3540 100644 --- a/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a0372b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_a0372b() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl index a3bbec3586..7b7b363ac4 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_a68027() { - var res: vec4 = textureGather(arg_0, arg_1, vec2(), 1u, vec2()); + var res: vec4 = textureGather(arg_0, arg_1, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl index b8b6990343..67fe27a058 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_a68027() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl index b8b6990343..67fe27a058 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_a68027() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl index 305ef61ced..e93a788c60 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 0.0, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl index ef44bea689..88b14906cb 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_a68027(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm index 6e66662571..b4fe504484 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,51 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureGather_a68027 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 ConstOffset %38 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_a68027 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_a68027 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_a68027 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_a68027 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_a68027 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_a68027 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl index 433101df99..29a6f59e31 100644 --- a/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/a68027.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_a68027() { - var res : vec4 = textureGather(arg_0, arg_1, vec2(), 1u, vec2()); + var res : vec4 = textureGather(arg_0, arg_1, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl index a80c3db25a..4d606abf85 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_aaf6bd() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1i); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl index b7a7ebda19..1746c5f59e 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_aaf6bd() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl index b7a7ebda19..1746c5f59e 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_aaf6bd() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl index e738ae22da..c04073313a 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_aaf6bd(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm index 6f938f5907..3c85db7fec 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_aaf6bd = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %29 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_aaf6bd +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_aaf6bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_aaf6bd + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_aaf6bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_aaf6bd + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_aaf6bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl index 6d9a1861d7..df39466166 100644 --- a/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/aaf6bd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_aaf6bd() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1i); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl index fff289821b..98d2001656 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_af55b3() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl index 11eeb8b23f..de1d9729db 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_af55b3() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl index 11eeb8b23f..de1d9729db 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_af55b3() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl index b9e44ef1ad..e76bd21d7b 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl index 292679bd37..508e894d46 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_af55b3(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm index ec4850a13e..822022944e 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.spvasm @@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureGather_af55b3 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %int_1 ConstOffset %29 + %19 = OpImageGather %v4float %23 %26 %int_1 ConstOffset %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_af55b3 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_af55b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl index 628443449b..a229a966af 100644 --- a/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/af55b3.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_af55b3() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl index 44b5d3dd31..83881aa9ea 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_bb3ac5() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl index e893100e0a..caf9dc9c1c 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bb3ac5() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl index e893100e0a..caf9dc9c1c 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bb3ac5() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl index a1b2221f64..29b1352329 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), 1); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl index 9be015a16f..13e04f3232 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_bb3ac5(texture2d tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm index 4d5ffe4dbf..70b14048e5 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.spvasm @@ -46,31 +46,31 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %31 = OpConstantNull %v4int - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %textureGather_bb3ac5 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %31 + %res = OpVariable %_ptr_Function_v4int Function %32 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %int_1 + %20 = OpImageGather %v4int %25 %28 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_bb3ac5 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGather_bb3ac5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl index 38ac385080..53bb85ad14 100644 --- a/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bb3ac5.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_bb3ac5() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl index c750140261..4b33ea2f02 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_bd33b6() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl index 243aa0142d..fc6816db05 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bd33b6() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl index 243aa0142d..fc6816db05 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bd33b6() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl index 54aa26c928..26d269431a 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl index 85eb095036..1c48649955 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_bd33b6(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm index 7d116142c0..27e924a5b5 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %37 = OpConstantNull %v4int - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4int + %42 = OpTypeFunction %v4float %textureGather_bd33b6 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %37 + %res = OpVariable %_ptr_Function_v4int Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %int_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %int_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_bd33b6 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_bd33b6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_bd33b6 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %50 = OpLabel %51 = OpFunctionCall %void %textureGather_bd33b6 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_bd33b6 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl index 2f8357e118..5fda733fdf 100644 --- a/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/bd33b6.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_bd33b6() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl index ac220e7897..e9d40045a4 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_be276f() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1u); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl index 1ce11f0433..18c39e8264 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_be276f() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl index 1ce11f0433..18c39e8264 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_be276f() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl index 2102740273..3161486f28 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_be276f(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm index a9063fa60e..b74fcbb295 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_be276f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %29 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_be276f +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_be276f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_be276f + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_be276f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_be276f + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_be276f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl index 30677071cc..f7c77f89ed 100644 --- a/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/be276f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_be276f() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1u); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl index cb2ef99176..0ab09afda4 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_c0640c() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1i); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl index d86b7f2a2e..53c8b4e4aa 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_c0640c() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl index d86b7f2a2e..53c8b4e4aa 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_c0640c() { - int4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + int4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl index 2af36677fe..e11538661f 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_c0640c(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm index 0f1c64918f..fd9487307a 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,43 +46,47 @@ %16 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4int + %38 = OpTypeFunction %v4float %textureGather_c0640c = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %32 + %res = OpVariable %_ptr_Function_v4int Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4int %25 %29 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_c0640c +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_c0640c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_c0640c + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_c0640c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_c0640c + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_c0640c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl index 5292611ca7..d8531e5756 100644 --- a/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/c0640c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_c0640c() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1i); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl index 4c99b08334..b92775d253 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_ccadde() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl index 6db0b426c7..33dd7a8eb5 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ccadde() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl index 6db0b426c7..33dd7a8eb5 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ccadde() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl index 442be7a6cb..444809b4f5 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - ivec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + ivec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl index d72fea5e0c..0e7c2a920e 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_ccadde(texture2d tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm index b6cd6d1a3f..9730bc7eb7 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.spvasm @@ -46,32 +46,32 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %textureGather_ccadde = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %32 + %res = OpVariable %_ptr_Function_v4int Function %33 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %uint_1 + %20 = OpImageGather %v4int %25 %28 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_ccadde +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureGather_ccadde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl index 95235f38c3..882bff66c5 100644 --- a/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ccadde.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_ccadde() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl index 6eea4f2446..4b9cb3d2d3 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_ce5578() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl index b6568c5181..789664a723 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ce5578() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl index b6568c5181..789664a723 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ce5578() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl index 9facfd76f2..f1da0f6869 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl index 0429b24860..3d69aa1dcc 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_ce5578(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm index 92777fb708..028e7429d7 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %37 = OpConstantNull %v4uint - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4uint + %42 = OpTypeFunction %v4float %textureGather_ce5578 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %37 + %res = OpVariable %_ptr_Function_v4uint Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %30 %int_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %int_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_ce5578 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_ce5578 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_ce5578 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %50 = OpLabel %51 = OpFunctionCall %void %textureGather_ce5578 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_ce5578 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl index d923193289..e7bf4f9280 100644 --- a/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ce5578.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_ce5578() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1u, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl index 8b24b975b7..d620c39063 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_cf9112() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl index eba887e1c8..bb0b068962 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_cf9112() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl index eba887e1c8..bb0b068962 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_cf9112() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl index 914fe38506..bf3a3b21da 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl index 6692ae704c..a6de319a1e 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_cf9112(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm index 6c310cecc9..e8069dde99 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,46 +46,50 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %36 = OpConstantNull %v4int - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4int + %42 = OpTypeFunction %v4float %textureGather_cf9112 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %36 + %res = OpVariable %_ptr_Function_v4int Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertUToF %float %uint_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %31 %uint_1 ConstOffset %33 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertUToF %float %uint_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %35 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureGather_cf9112 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_cf9112 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_cf9112 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_cf9112 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_cf9112 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_cf9112 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl index 2bae0effc8..564f9d41c9 100644 --- a/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/cf9112.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_cf9112() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl index 2552e7dfba..ccf992d52d 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_d1f187() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl index ad1a98fa20..a243d4d142 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d1f187() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl index ad1a98fa20..a243d4d142 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d1f187() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl index 442d77ae01..c3560b3271 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl index 1f50d685e2..10a2701eff 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d1f187(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm index 369e2a3d72..6dc0006ed0 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,46 +46,49 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %36 = OpConstantNull %v4uint - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpConstantNull %v4uint + %41 = OpTypeFunction %v4float %textureGather_d1f187 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %36 + %res = OpVariable %_ptr_Function_v4uint Function %40 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %int_1 ConstOffset %33 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %int_1 ConstOffset %37 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureGather_d1f187 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_d1f187 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_d1f187 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %49 = OpLabel %50 = OpFunctionCall %void %textureGather_d1f187 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_d1f187 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl index f36201fc7a..d1d1604ece 100644 --- a/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d1f187.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d1f187() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl index 418dd84547..4bb48af648 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_d4b5c6() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1i); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl index e433e9fd9c..db76898f89 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d4b5c6() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl index e433e9fd9c..db76898f89 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d4b5c6() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl index bc0c651f3d..b650d7ca6f 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d4b5c6(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm index 1a021e741d..b18aa5cfb0 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,45 +46,49 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_d4b5c6 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %34 + %res = OpVariable %_ptr_Function_v4uint Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %30 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_d4b5c6 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_d4b5c6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_d4b5c6 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_d4b5c6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_d4b5c6 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_d4b5c6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl index 5d58e825ec..609c368613 100644 --- a/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d4b5c6.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d4b5c6() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1i); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl index 8ba61698d1..073ad9d70e 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_d6507c() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl index 5cff95a393..50b89a7c64 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d6507c() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl index 5cff95a393..50b89a7c64 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d6507c() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl index 784e65a445..910608c485 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl index 09b407013f..b1765cd49e 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d6507c(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm index 04e9724023..c60fde8e3f 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,44 +44,45 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %30 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_d6507c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %uint_1 ConstOffset %30 + %19 = OpImageGather %v4float %23 %26 %uint_1 ConstOffset %32 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_d6507c +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_d6507c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_d6507c + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_d6507c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_d6507c + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_d6507c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl index b30e7d61e1..dde2df1943 100644 --- a/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d6507c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d6507c() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl index ab46f58c62..0c7ac792ab 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_d8e958() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl index eebba11773..4e15eb9abe 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d8e958() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl index eebba11773..4e15eb9abe 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d8e958() { - float4 res = arg_1.GatherGreen(arg_2, (0.0f).xx); + float4 res = arg_1.GatherGreen(arg_2, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl index ce1520fe3b..d16dc37fb5 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec4 res = textureGather(arg_1_arg_2, vec2(0.0f), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec2(1.0f), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl index 0f6d2777a6..7370e3d97d 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d8e958(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm index accc34fc9c..af1b869c67 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.spvasm @@ -44,31 +44,31 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %31 = OpTypeFunction %v4float %textureGather_d8e958 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageGather %v4float %23 %25 %uint_1 + %19 = OpImageGather %v4float %23 %26 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureGather_d8e958 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureGather_d8e958 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl index bbc0a35a4e..baa65008ef 100644 --- a/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d8e958.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d8e958() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl index 88a3639448..321c953bfa 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_d90605() { - var res: vec4 = textureGather(arg_0, arg_1, vec2(), 1i, vec2()); + var res: vec4 = textureGather(arg_0, arg_1, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl index 8a54bc6267..2b2b0683f9 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_d90605() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl index 8a54bc6267..2b2b0683f9 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_d90605() { - float4 res = arg_0.Gather(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl index 5028f86173..62ea44e239 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 0.0, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl index 90be232ac8..9d7e1fa0d8 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d90605(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm index 38cffa3654..13a26f20e4 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,49 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureGather_d90605 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %int_0 ConstOffset %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %int_0 ConstOffset %36 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_d90605 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_d90605 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_d90605 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %47 = OpLabel %48 = OpFunctionCall %void %textureGather_d90605 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_d90605 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl index d2374c4cf2..67d080c8ce 100644 --- a/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d90605.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_d90605() { - var res : vec4 = textureGather(arg_0, arg_1, vec2(), 1i, vec2()); + var res : vec4 = textureGather(arg_0, arg_1, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl index b78c3427d0..67a70dd8f7 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_d98d59() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1i); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl index 10e683dd4e..847af8367f 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d98d59() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl index 10e683dd4e..847af8367f 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d98d59() { - float4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl index ca2a849773..7b5236f13c 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d98d59(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm index 88ac5d0f78..d431a1a5af 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_d98d59 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageGather %v4float %23 %28 %uint_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_d98d59 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_d98d59 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_d98d59 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_d98d59 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_d98d59 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_d98d59 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl index 87129c299e..5b2fb59367 100644 --- a/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/d98d59.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_d98d59() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1i); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl index 8d8fe8a289..afce732e85 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_dc6661() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl index 9a1ecb65d0..ed4cb87cb6 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_dc6661() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl index 9a1ecb65d0..ed4cb87cb6 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_dc6661() { - int4 res = arg_1.GatherGreen(arg_2, (0.0f).xx, (0).xx); + int4 res = arg_1.GatherGreen(arg_2, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl index 1241fbb3a1..ca5290e381 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(0.0f), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec2(1.0f), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl index a998cf190f..cff8c55db2 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_dc6661(texture2d tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm index a090bed991..dbe25ea68d 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,44 +46,45 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %27 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %33 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4int + %37 = OpTypeFunction %v4float %textureGather_dc6661 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %34 + %res = OpVariable %_ptr_Function_v4int Function %36 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %20 = OpImageGather %v4int %25 %27 %uint_1 ConstOffset %31 + %20 = OpImageGather %v4int %25 %28 %uint_1 ConstOffset %33 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_dc6661 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_dc6661 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_dc6661 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_dc6661 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_dc6661 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_dc6661 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl index 607129c1dd..2554a6d485 100644 --- a/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/dc6661.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_dc6661() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl index d0167f4c9d..3b023f588c 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_e2acac() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1u); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl index a3337ecc68..939783fb2e 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e2acac() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl index a3337ecc68..939783fb2e 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e2acac() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1u))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl index 23a18ae863..1b4d074465 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_e2acac(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1u, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1u, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm index 31bb98c371..a96aeef718 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,43 +46,47 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4uint + %38 = OpTypeFunction %v4float %textureGather_e2acac = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %32 + %res = OpVariable %_ptr_Function_v4uint Function %37 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %29 %uint_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %34 %uint_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_e2acac +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_e2acac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_e2acac + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_e2acac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_e2acac + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_e2acac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl index f1b2b9c084..9a2bd67165 100644 --- a/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e2acac.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_e2acac() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(), 1u); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl index f1fc8887a3..307415a81f 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_e3165f() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i, vec2()); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl index e5afb5ce9a..64a37952e3 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e3165f() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl index e5afb5ce9a..64a37952e3 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e3165f() { - uint4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl index 914af11196..1b7a7d66cd 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl index 12b0c1db72..3fec78a81a 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_e3165f(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm index 44389015c6..e068a6bced 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,47 +46,50 @@ %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %37 = OpConstantNull %v4uint - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpConstantNull %v4uint + %42 = OpTypeFunction %v4float %textureGather_e3165f = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %37 + %res = OpVariable %_ptr_Function_v4uint Function %41 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %31 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4uint %25 %31 %uint_1 ConstOffset %34 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %uint_1 ConstOffset %38 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_e3165f +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGather_e3165f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_e3165f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %50 = OpLabel %51 = OpFunctionCall %void %textureGather_e3165f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_e3165f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl index 9f1dab6b0e..e7641f87a9 100644 --- a/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e3165f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_e3165f() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1i, vec2()); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl index 5f2f74b9f8..255614856f 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_e9d390() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i, vec2()); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl index 2d2893d773..eb97f7f93b 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e9d390() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl index 2d2893d773..eb97f7f93b 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e9d390() { - int4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl index fc9b73f561..783e77d018 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(vec2(1.0f), float(1)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl index 2449d25a52..7b055861f2 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_e9d390(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - int4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm index aa462bc923..191810137a 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,45 +46,48 @@ %v4int = OpTypeVector %int 4 %24 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v2float %float_1 %float_1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %textureGather_e9d390 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %35 + %res = OpVariable %_ptr_Function_v4int Function %39 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %28 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %28 - %20 = OpImageGather %v4int %25 %30 %int_1 ConstOffset %32 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %30 %31 %32 + %20 = OpImageGather %v4int %25 %34 %int_1 ConstOffset %36 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_e9d390 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_e9d390 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_e9d390 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %16 %48 = OpLabel %49 = OpFunctionCall %void %textureGather_e9d390 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %16 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_e9d390 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl index 71d137afd8..4bb69673e6 100644 --- a/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/e9d390.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_e9d390() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(), 1i, vec2()); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl index 66b6acabab..02e3c9e448 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_ea8eb4() { - var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u); + var res: vec4 = textureGather(1u, arg_1, arg_2, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl index 3e69b66d21..1441e148f0 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ea8eb4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl index 3e69b66d21..1441e148f0 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ea8eb4() { - float4 res = arg_1.GatherGreen(arg_2, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_1.GatherGreen(arg_2, float3((1.0f).xx, float(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl index 4c080b4cec..a81c2ff4e6 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec4 res = textureGather(arg_1_arg_2, vec3(0.0f, 0.0f, float(1u)), int(1u)); + vec4 res = textureGather(arg_1_arg_2, vec3(vec2(1.0f), float(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl index 258c19872d..8c8a791e7b 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_ea8eb4(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather(tint_symbol_2, float2(0.0f), 1u, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, float2(1.0f), 1u, int2(0), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm index e7c0ab1397..2fbe3770b2 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureGather_ea8eb4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_2 %21 = OpLoad %11 %arg_1 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageGather %v4float %23 %29 %uint_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageGather %v4float %23 %33 %uint_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGather_ea8eb4 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGather_ea8eb4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGather_ea8eb4 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %44 = OpLabel %45 = OpFunctionCall %void %textureGather_ea8eb4 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_ea8eb4 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl index 238176e47e..9338598f5c 100644 --- a/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/ea8eb4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_ea8eb4() { - var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(), 1u); + var res : vec4 = textureGather(1u, arg_1, arg_2, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl index 42582b17fa..1dccc19b65 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl @@ -25,7 +25,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_f2c6e3() { - var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1i); + var res: vec4 = textureGather(1i, arg_1, arg_2, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl index a6114a7f6f..e9504c066f 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_f2c6e3() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl index a6114a7f6f..e9504c066f 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_f2c6e3() { - uint4 res = arg_1.GatherGreen(arg_2, float4(0.0f, 0.0f, 0.0f, float(1))); + uint4 res = arg_1.GatherGreen(arg_2, float4((1.0f).xxx, float(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl index 3d5fb84107..c720bbc26a 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_f2c6e3(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(0.0f), 1, component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, float3(1.0f), 1, component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm index 43cb212c2e..9929191668 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 52 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,44 +46,48 @@ %16 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %24 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4uint + %39 = OpTypeFunction %v4float %textureGather_f2c6e3 = OpFunction %void None %16 %19 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %33 + %res = OpVariable %_ptr_Function_v4uint Function %38 %22 = OpLoad %15 %arg_2 %23 = OpLoad %11 %arg_1 %25 = OpSampledImage %24 %23 %22 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %27 - %20 = OpImageGather %v4uint %25 %30 %int_1 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpCompositeExtract %float %28 2 + %32 = OpConvertSToF %float %int_1 + %35 = OpCompositeConstruct %v4float %29 %30 %31 %32 + %20 = OpImageGather %v4uint %25 %35 %int_1 OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureGather_f2c6e3 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_f2c6e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGather_f2c6e3 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_f2c6e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_f2c6e3 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_f2c6e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl index 5f3fd15acf..d7b38f2f60 100644 --- a/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGather/f2c6e3.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(2) var arg_2 : sampler; fn textureGather_f2c6e3() { - var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(), 1i); + var res : vec4 = textureGather(1i, arg_1, arg_2, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl index 23d232d3ab..7255eea3bf 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_144a9a() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1u, 1.f, vec2()); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.f), 1u, 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl index 59db391468..e09886a482 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_144a9a() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl index 59db391468..e09886a482 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_144a9a() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl index 8c6787a8fb..4e9b3f55e1 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl index 0d772d3263..ec65869691 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_144a9a(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm index b80ccb6278..2080c9c653 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %textureGatherCompare_144a9a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 ConstOffset %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 ConstOffset %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGatherCompare_144a9a +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGatherCompare_144a9a + %48 = OpLabel + %49 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGatherCompare_144a9a + %51 = OpLabel + %52 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl index 364576279e..e8628759e8 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/144a9a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_144a9a() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1u, 1.0f, vec2()); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.0f), 1u, 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl index bbf11237f0..7ebc6262dd 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> vec4 fn textureGatherCompare_182fd4() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.f); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl index 4f6161c935..c58d9d6e71 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_182fd4() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl index 4f6161c935..c58d9d6e71 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_182fd4() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl index 29117676ac..b6a28aad53 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl index 5c3e528957..4bae14aba1 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_182fd4(depthcube tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm index f24d7809ea..c86a01eaa2 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.spvasm @@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureGatherCompare_182fd4 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageDrefGather %v4float %23 %25 %float_1 + %19 = OpImageDrefGather %v4float %23 %26 %float_1 OpStore %res %19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl index e1f2612e41..970f9e0609 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/182fd4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_182fd4() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1.0f); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl index 256e2028cf..5caeb53473 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: u32, depth_ref: f32) -> vec4 fn textureGatherCompare_2e409c() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1u, 1.f); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(1.f), 1u, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl index a21855345f..292a9567d6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_2e409c() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl index a21855345f..292a9567d6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_2e409c() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl index 30ff99abcd..266a38afff 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_2e409c(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(1.0f), 1u, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm index 9c8dc277ca..462fa94403 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_2e409c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageDrefGather %v4float %23 %28 %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGatherCompare_2e409c +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGatherCompare_2e409c + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_2e409c + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl index f45cdf95f7..2ac37989dd 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/2e409c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_2e409c() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1u, 1.0f); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(1.0f), 1u, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl index bd87b467a2..aa0a49f7ce 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_313add() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.f, vec2()); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.f), 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl index 3512f9a768..e491dd643b 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_313add() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl index 3512f9a768..e491dd643b 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_313add() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl index 7416e88749..4c62095c70 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl index 2b15285c32..94695aa2ea 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_313add(depth2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1.0f, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1.0f, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm index 1875a0a776..9514a14589 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %textureGatherCompare_313add = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageDrefGather %v4float %23 %25 %float_1 ConstOffset %29 + %19 = OpImageDrefGather %v4float %23 %26 %float_1 ConstOffset %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGatherCompare_313add +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureGatherCompare_313add OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGatherCompare_313add + %41 = OpLabel + %42 = OpFunctionCall %void %textureGatherCompare_313add OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_313add + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_313add OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl index ab31a89c24..bf4da2a5ce 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/313add.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_313add() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0f, vec2()); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.0f), 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl index 1d1b90eb42..708587cc46 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_60d2d1() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1i, 1.f); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec3(1.f), 1i, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl index 3cc753f8e8..efa458cf92 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_60d2d1() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl index 3cc753f8e8..efa458cf92 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_60d2d1() { - float4 res = arg_0.GatherCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl index b0505731a2..4b8a3dcad7 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_60d2d1(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(0.0f), 1, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float3(1.0f), 1, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm index e5f9745c27..455ebfde01 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_60d2d1 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageDrefGather %v4float %23 %28 %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureGatherCompare_60d2d1 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGatherCompare_60d2d1 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_60d2d1 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl index b7734ea8b1..1c5835377e 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/60d2d1.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_60d2d1() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(), 1i, 1.0f); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec3(1.0f), 1i, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl index 5ca12685bf..a08f8135f2 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> vec4 fn textureGatherCompare_6d9352() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.f); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl index 38bce11c53..0d45110574 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_6d9352() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl index 38bce11c53..0d45110574 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_6d9352() { - float4 res = arg_0.GatherCmp(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.GatherCmp(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl index e1ec03252d..69d67d84ef 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec4 res = textureGather(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec2(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl index a5b7ececb7..d9890db5a4 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_6d9352(depth2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm index 355943fb95..a51254d264 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.spvasm @@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureGatherCompare_6d9352 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageDrefGather %v4float %23 %25 %float_1 + %19 = OpImageDrefGather %v4float %23 %26 %float_1 OpStore %res %19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl index c6898c2ecc..50afea15d3 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/6d9352.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_6d9352() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1.0f); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl index 655e44c9d9..ae922acf0e 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_783e65() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1i, 1.f); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.f), 1i, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl index 702933d86a..d3c0cafef7 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_783e65() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl index 702933d86a..d3c0cafef7 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_783e65() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl index bfc941fa8d..5f0ff47b2a 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl index 5c8eb746b9..99117b5704 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_783e65(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm index 6ae28fa867..bf059eccc3 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_783e65 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGatherCompare_783e65 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGatherCompare_783e65 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %44 = OpLabel %45 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_783e65 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl index 31377a1194..d46598730d 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/783e65.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_783e65() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1i, 1.0f); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.0f), 1i, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl index d75e00ea11..287fded1bb 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32) -> vec4 fn textureGatherCompare_b5bc43() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1u, 1.f); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.f), 1u, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl index 9a9dd99660..371282204d 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_b5bc43() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl index 9a9dd99660..371282204d 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_b5bc43() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl index 886094097c..25583512f8 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec4 res = textureGather(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureGather(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl index e9cc2f5ba9..7f2c077e07 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_b5bc43(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm index dde1b1da66..f44ebac99b 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_b5bc43 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGatherCompare_b5bc43 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureGatherCompare_b5bc43 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %44 = OpLabel %45 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_b5bc43 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl index 651c7099f6..47b8417432 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/b5bc43.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_b5bc43() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1u, 1.0f); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.0f), 1u, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl index 3b15c8a6de..24c5b53ea6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_f585cc() { - var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1i, 1.f, vec2()); + var res: vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.f), 1i, 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl index ba3d6fdb54..7df2b78b2f 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_f585cc() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl index ba3d6fdb54..7df2b78b2f 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_f585cc() { - float4 res = arg_0.GatherCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl index be0c7bf89d..69f0437cc5 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl index e6c687e19d..d04ae1b02f 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_f585cc(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(0.0f), 1, 1.0f, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, float2(1.0f), 1, 1.0f, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm index d52aee2043..441d09ace6 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %38 = OpTypeFunction %v4float %textureGatherCompare_f585cc = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageDrefGather %v4float %23 %29 %float_1 ConstOffset %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageDrefGather %v4float %23 %33 %float_1 ConstOffset %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGatherCompare_f585cc +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_f585cc - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGatherCompare_f585cc + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl index 212777eaaf..c4a766e551 100644 --- a/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureGatherCompare/f585cc.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_f585cc() { - var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(), 1i, 1.0f, vec2()); + var res : vec4 = textureGatherCompare(arg_0, arg_1, vec2(1.0f), 1i, 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl index 5f879ee1df..7740c87fcb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_019da0() { - var res: vec4 = textureLoad(arg_0, vec3(), 1u); + var res: vec4 = textureLoad(arg_0, vec3(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl index 170fe3b9d0..a6529f3731 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_019da0() { - float4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + float4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl index 170fe3b9d0..a6529f3731 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_019da0() { - float4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + float4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl index faaf797748..c50964f22b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - vec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - vec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - vec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl index 045982aa54..f65f4912b7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_019da0(texture3d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(int3(0)), 1u); + float4 res = tint_symbol_1.read(uint3(int3(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.spvasm index eb8a7d169c..d3c19e8a15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_019da0 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_019da0 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_019da0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_019da0 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_019da0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_019da0 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_019da0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl index bff3b369c4..6be5845c9b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/019da0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_019da0() { - var res : vec4 = textureLoad(arg_0, vec3(), 1u); + var res : vec4 = textureLoad(arg_0, vec3(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl index 4a46227faf..c975fc8cd0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_026217() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl index 5deed86c01..9e62a78cae 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_026217() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl index 5deed86c01..9e62a78cae 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_026217() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl index 4647792ace..cc5bd39822 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl index 6b84ada402..5b3b457cf2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_026217(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm index 8bb3a86134..e0eeadcb73 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,42 +39,45 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_026217 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %23 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4uint %19 %26 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_026217 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_026217 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_026217 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureLoad_026217 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_026217 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl index 927fb497d6..1e8d2fdd62 100644 --- a/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/026217.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_026217() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl index a7ebfdff95..827a434735 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: u32) -> f32 fn textureLoad_04b911() { - var res: f32 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: f32 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl index 5b1cf98903..7f98f2aeed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_04b911() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl index 5b1cf98903..7f98f2aeed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_04b911() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl index 045c7b80d9..57a080637f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl index 5b8aa49bd3..c01b94ec25 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_04b911(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm index 29b2cb3924..9eb7c419d5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,43 +38,46 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_04b911 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_04b911 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_04b911 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_04b911 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %41 = OpLabel %42 = OpFunctionCall %void %textureLoad_04b911 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_04b911 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl index f1d96a87ea..6a1b6bf02c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/04b911.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_04b911() { - var res : f32 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : f32 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl index 56e1e07fcc..9001543534 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_168dc8() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl index 78a12825e6..b00f60da52 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_168dc8() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl index 78a12825e6..b00f60da52 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_168dc8() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl index 208d0ce1fd..766be6fc4a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl index 407397fca6..2563a9a98e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_168dc8(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.spvasm index 635d95a64b..e212e56e32 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,41 +40,45 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_168dc8 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %23 - %17 = OpImageFetch %v4int %19 %25 Lod %int_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %25 %26 %27 + %17 = OpImageFetch %v4int %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_168dc8 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_168dc8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_168dc8 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_168dc8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_168dc8 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_168dc8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl index 4a87cc4ce7..300c1ce4ea 100644 --- a/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/168dc8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_168dc8() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl index 20a8cd8384..5a70d330a1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: i32) -> f32 fn textureLoad_19cf87() { - var res: f32 = textureLoad(arg_0, vec2(), 1i); + var res: f32 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl index 152b4a7844..67e6c7f34a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_19cf87() { - float res = arg_0.Load(int3(0, 0, 1)).x; + float res = arg_0.Load(int3((1).xx, 1)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl index 152b4a7844..67e6c7f34a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_19cf87() { - float res = arg_0.Load(int3(0, 0, 1)).x; + float res = arg_0.Load(int3((1).xx, 1)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl index baa484d30d..ca2516924d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl index adf907585e..1fdb40c0d0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_19cf87(depth2d tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm index 5e9484a0e4..c98b8945f0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %int_1 + %17 = OpImageFetch %v4float %18 %22 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn diff --git a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl index 9a14b92e5c..118ecdc8f6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/19cf87.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_19cf87() { - var res : f32 = textureLoad(arg_0, vec2(), 1i); + var res : f32 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl index f137b5929d..658102bfbf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_1b051f() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl index 52b2377aed..b022c62c20 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_1b051f() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl index 52b2377aed..b022c62c20 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_1b051f() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl index 99a31bb061..1d3c84ed52 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl index 77655f213b..8de4367a39 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1b051f(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.spvasm index 952a0fb824..bbf31ea3fd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,41 +40,45 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_1b051f = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %23 - %17 = OpImageFetch %v4uint %19 %25 Lod %uint_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %25 %26 %27 + %17 = OpImageFetch %v4uint %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_1b051f +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_1b051f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_1b051f + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_1b051f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_1b051f + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_1b051f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl index 99f3b15f19..a4543cf165 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1b051f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_1b051f() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl index 224ae8bfba..8fca51e890 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_external, coords: vec2) -> vec4 fn textureLoad_1bfdfb() { - var res: vec4 = textureLoad(arg_0, vec2()); + var res: vec4 = textureLoad(arg_0, vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl index a4dd10785f..28536b30b0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_1bfdfb() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl index a4dd10785f..28536b30b0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_1bfdfb() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0u).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1u).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl index e65e74845c..2c2df83034 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.glsl @@ -49,7 +49,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner); } vec4 vertex_main() { @@ -117,7 +117,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner); } void fragment_main() { @@ -179,7 +179,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(0u), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, uvec2(1u), ext_tex_params.inner); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl index e5b7c012f5..dfb5020bb4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.msl @@ -58,7 +58,7 @@ float4 textureLoadExternal(texture2d plane0, texture2d tint_symbol_1, texture2d tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) { - float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, uint2(0u), *(tint_symbol_3)); + float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, uint2(1u), *(tint_symbol_3)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm index 4ac1277a90..72a5227a75 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.spvasm @@ -114,7 +114,7 @@ %93 = OpConstantNull %uint %void = OpTypeVoid %111 = OpTypeFunction %void - %118 = OpConstantNull %v2uint + %118 = OpConstantComposite %v2uint %uint_1 %uint_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float diff --git a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl index a67b2bfb09..0f0f7e593c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1bfdfb.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_external; fn textureLoad_1bfdfb() { - var res : vec4 = textureLoad(arg_0, vec2()); + var res : vec4 = textureLoad(arg_0, vec2(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl index 147ef2e110..a58f7f1b0e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_1c562a() { - var res: vec4 = textureLoad(arg_0, vec3(), 1u); + var res: vec4 = textureLoad(arg_0, vec3(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl index 69fa517f21..105cec919a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1c562a() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + uint4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl index 69fa517f21..105cec919a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1c562a() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + uint4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl index 5d0ca1be01..a2ea31985b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl index 08ec83313b..d302202460 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1c562a(texture3d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u); + uint4 res = tint_symbol_1.read(uint3(uint3(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm index 3aab4ea658..715a68fa59 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.spvasm @@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %25 = OpConstantNull %v4uint %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl index a62fc0fa32..18a8b91bf2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1c562a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_1c562a() { - var res : vec4 = textureLoad(arg_0, vec3(), 1u); + var res : vec4 = textureLoad(arg_0, vec3(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl index b81858c3d5..7076b0dd4e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_1f2016() { - var res: vec4 = textureLoad(arg_0, vec3(), 1i); + var res: vec4 = textureLoad(arg_0, vec3(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl index 7eba4d90f7..4c90af7151 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1f2016() { - float4 res = arg_0.Load(int4(0, 0, 0, 1)); + float4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl index 7eba4d90f7..4c90af7151 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1f2016() { - float4 res = arg_0.Load(int4(0, 0, 0, 1)); + float4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl index 0fd2eaa45b..7665fa9b58 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - vec4 res = texelFetch(arg_0_1, ivec3(0), 1); + vec4 res = texelFetch(arg_0_1, ivec3(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - vec4 res = texelFetch(arg_0_1, ivec3(0), 1); + vec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - vec4 res = texelFetch(arg_0_1, ivec3(0), 1); + vec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl index fce3e6c9bc..4b467ffc00 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1f2016(texture3d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(int3(0)), 1); + float4 res = tint_symbol_1.read(uint3(int3(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm index 6717fa17d2..d4b7a52184 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl index dfb4e0bb81..0f1280477f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/1f2016.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_1f2016() { - var res : vec4 = textureLoad(arg_0, vec3(), 1i); + var res : vec4 = textureLoad(arg_0, vec3(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl index ac39ee5973..9b748d3985 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_21d1c4() { - var res: vec4 = textureLoad(arg_0, vec3(), 1u); + var res: vec4 = textureLoad(arg_0, vec3(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl index 04e91b0ed7..9bb0b9082f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_21d1c4() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + float4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl index 04e91b0ed7..9bb0b9082f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_21d1c4() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + float4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl index 6d8e740f66..22257ebac0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl index a18d7cf5b0..d0e07c0751 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_21d1c4(texture3d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u); + float4 res = tint_symbol_1.read(uint3(uint3(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm index ca20303a87..10c41bab74 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl index 2cfba765b5..6f8836b32c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/21d1c4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_21d1c4() { - var res : vec4 = textureLoad(arg_0, vec3(), 1u); + var res : vec4 = textureLoad(arg_0, vec3(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl index c31e51d794..3fcb072813 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_223246() { - var res: vec4 = textureLoad(arg_0, vec3(), 1i); + var res: vec4 = textureLoad(arg_0, vec3(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl index c434c8cb90..eb9abb9b61 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_223246() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + int4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl index c434c8cb90..eb9abb9b61 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_223246() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + int4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl index 39f77c1a78..b9e9662985 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_223246() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_223246() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_223246() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl index 3372521766..f2a55f3501 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_223246(texture3d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(uint3(0u)), 1); + int4 res = tint_symbol_1.read(uint3(uint3(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm index bba82c9a28..f04782923d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %22 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_223246 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %int_1 + %17 = OpImageFetch %v4int %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_223246 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_223246 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_223246 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_223246 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_223246 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_223246 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl index 1a14589850..fca4b78804 100644 --- a/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/223246.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_223246() { - var res : vec4 = textureLoad(arg_0, vec3(), 1i); + var res : vec4 = textureLoad(arg_0, vec3(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl index 4d77af6f75..f0c424d0ca 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_2363be() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl index 1fcee1bc0c..eaad1bfedd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_2363be() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl index 1fcee1bc0c..eaad1bfedd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_2363be() { - int4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl index 1854c65d88..9b0a59d188 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl index 2281819764..bccc5c97ac 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2363be(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm index 35dce1eaf5..8913113dad 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 - %int_1 = OpConstant %int 1 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 + %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpConstantNull %v4int - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_2363be = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %23 - %17 = OpImageFetch %v4int %19 %25 Lod %uint_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %25 %26 %27 + %17 = OpImageFetch %v4int %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_2363be +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_2363be OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_2363be - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %42 = OpLabel %43 = OpFunctionCall %void %textureLoad_2363be OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_2363be + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl index 295dadcf5c..2a5b51feb9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2363be.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_2363be() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl index 102ca0b63e..8e7407e948 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_2d479c() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl index 48743d7264..14a97df8c7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_2d479c() { - float4 res = arg_0.Load(int3(0, 0, int(1u))); + float4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl index 48743d7264..14a97df8c7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_2d479c() { - float4 res = arg_0.Load(int3(0, 0, int(1u))); + float4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl index 480acb77b4..baf0eac9dc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl index 64a9fa90e4..918c872ebf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2d479c(texture2d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.spvasm index ea0f240caf..d56c68c2ae 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_2d479c = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_2d479c +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_2d479c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_2d479c + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_2d479c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_2d479c + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_2d479c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl index 93532d7f13..33dcc85f1c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2d479c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_2d479c() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl index c202f48b37..f62ef1d421 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_2e09aa() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl index 9cc10ce5e4..fcb64809da 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_2e09aa() { - float4 res = arg_0.Load((0u).xx, 1u); + float4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl index 9cc10ce5e4..fcb64809da 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_2e09aa() { - float4 res = arg_0.Load((0u).xx, 1u); + float4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl index 1fc3bfbfc5..630e2fa7ef 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl index 48b5ac4dae..3ae89d4603 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2e09aa(texture2d_ms tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm index 1964e3021a..cce0307868 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %uint_1 + %16 = OpImageFetch %v4float %17 %21 Sample %uint_1 OpStore %res %16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl index ca4270f324..58a8595948 100644 --- a/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/2e09aa.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_2e09aa() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl index 1ba95c1fab..098f8ed311 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_38f8ab() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl index b32e2f097b..1e31cb2e02 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_38f8ab() { - int4 res = arg_0.Load((0).xx, 1u); + int4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl index b32e2f097b..1e31cb2e02 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_38f8ab() { - int4 res = arg_0.Load((0).xx, 1u); + int4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl index 199f0a9f80..696e66a2c5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl index 062a78c0e4..889349b10a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_38f8ab(texture2d_ms tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm index 5bcd7adeb3..d440a8a85b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_38f8ab = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Sample %uint_1 + %17 = OpImageFetch %v4int %19 %22 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_38f8ab +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_38f8ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_38f8ab + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_38f8ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_38f8ab + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_38f8ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl index 0a81a11dc2..a97ddc27ba 100644 --- a/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/38f8ab.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_38f8ab() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl index f3db7a0175..f829c89dc0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_3c96e8() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl index 1b18d6fd8b..d280db1810 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3c96e8() { - float4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl index 1b18d6fd8b..d280db1810 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3c96e8() { - float4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl index 712a973aa8..92d7508d09 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl index 468cb472aa..ad54598161 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_3c96e8(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm index 4aaf7c8400..479336b9b0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_3c96e8 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %uint_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_3c96e8 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_3c96e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_3c96e8 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_3c96e8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_3c96e8 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_3c96e8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl index 487fe60ef4..a4d17d7eb7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3c96e8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_3c96e8() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl index a7f50c390f..7668515c2c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_3d3fd1() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl index f31c316221..5ad0afa754 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3d3fd1() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl index f31c316221..5ad0afa754 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3d3fd1() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl index 9d295c5a20..4792dc9f29 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl index 63fddeb59e..c19db9b3e1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_3d3fd1(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm index 73e34011ba..430ee7f2d8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,41 +40,44 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %24 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_3d3fd1 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %24 Lod %int_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpCompositeConstruct %v3uint %25 %26 %uint_1 + %17 = OpImageFetch %v4int %19 %27 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_3d3fd1 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_3d3fd1 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_3d3fd1 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl index a0535545a0..21750608d1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/3d3fd1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_3d3fd1() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl index d677077a83..6fd6433185 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_439e2a() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl index 04be84720f..eadf395e2c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_439e2a() { - float4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + float4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl index 04be84720f..eadf395e2c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_439e2a() { - float4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + float4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl index 3e1a9c929c..0b40108ee2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl index 9a44d70509..89084847ec 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_439e2a(texture2d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.spvasm index bd1476091f..81e00fd8b3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_439e2a = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_439e2a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_439e2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_439e2a + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_439e2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_439e2a + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_439e2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl index 0cc7d748f1..2d369bc731 100644 --- a/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/439e2a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_439e2a() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl index eb46b20637..dc25830c0d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_46a93f() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl index efe3b08f66..4342746849 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_46a93f() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl index efe3b08f66..4342746849 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_46a93f() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl index ba12442e18..1fb6bc8f8a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl index 06c32ea9ab..3329dec0ca 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_46a93f(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.spvasm index a294467189..c241fcb690 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_46a93f = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %uint_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_46a93f +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_46a93f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_46a93f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %40 = OpLabel %41 = OpFunctionCall %void %textureLoad_46a93f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_46a93f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl index f5a4417068..3113448bbc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/46a93f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_46a93f() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl index 76e971835d..90aa004201 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_47e818() { - var res: vec4 = textureLoad(arg_0, vec3(), 1u); + var res: vec4 = textureLoad(arg_0, vec3(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl index a0f9ce2851..8c4b83d363 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_47e818() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + int4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl index a0f9ce2851..8c4b83d363 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_47e818() { - int4 res = arg_0.Load(uint4(0u, 0u, 0u, 1u)); + int4 res = arg_0.Load(uint4((1u).xxx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl index 78f7a1c402..029590a3e2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl index 91e3739b9a..6ecc7e38b2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_47e818(texture3d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(uint3(0u)), 1u); + int4 res = tint_symbol_1.read(uint3(uint3(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm index fbb4de77b0..4c8586c53d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.spvasm @@ -40,8 +40,8 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %22 = OpConstantNull %v3uint %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %26 = OpConstantNull %v4int %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl index 3f95949636..6136a752c4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/47e818.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_47e818() { - var res : vec4 = textureLoad(arg_0, vec3(), 1u); + var res : vec4 = textureLoad(arg_0, vec3(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl index e7383c548a..daeb8ca9e8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_484344() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl index 4c6823606d..89d61538bf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_484344() { - float4 res = arg_0.Load(int3(0, 0, 1)); + float4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl index 4c6823606d..89d61538bf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_484344() { - float4 res = arg_0.Load(int3(0, 0, 1)); + float4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl index 121a7a6336..fadc4d62d5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_484344() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_484344() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_484344() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl index 00171e51b3..c216bdd814 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_484344(texture2d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm index 14bf5a5877..a3f32503ba 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl index 2b3cc7d2c2..d9f4d5677b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/484344.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_484344() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl index d4e119531b..ccf8f01773 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_49f76f() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl index 6152f0272d..173f0f39b2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_49f76f() { - uint4 res = arg_0.Load((0u).xx, 1u); + uint4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl index 6152f0272d..173f0f39b2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_49f76f() { - uint4 res = arg_0.Load((0u).xx, 1u); + uint4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl index 4f67942ee3..345b3ce0b0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl index cae2ed1abd..b4f6aa405e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_49f76f(texture2d_ms tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm index 12cfa42358..9e7b60241c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.spvasm @@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %25 = OpConstantNull %v4uint %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Sample %uint_1 + %17 = OpImageFetch %v4uint %19 %22 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl index b1ad019438..11774fa501 100644 --- a/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/49f76f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_49f76f() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl index 82d2b572dc..5b9f2236c3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_4acb64() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl index 21f231b634..eb2d9c495e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_4acb64() { - float4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl index 21f231b634..eb2d9c495e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_4acb64() { - float4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl index 049088779a..af90d6cb9a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl index 247c9fcf59..390a2d28ed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4acb64(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.spvasm index 1fcd8ecc4c..b77fa30d9c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_4acb64 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %int_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_4acb64 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_4acb64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_4acb64 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %40 = OpLabel %41 = OpFunctionCall %void %textureLoad_4acb64 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_4acb64 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl index f55bd6bdda..b3783d9320 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4acb64.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_4acb64() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl index 3418786373..c16d5b6a2d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: u32) -> f32 fn textureLoad_4db25c() { - var res: f32 = textureLoad(arg_0, vec2(), 1u); + var res: f32 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl index 13ff0bad96..ba4ee5ff48 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_4db25c() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl index 13ff0bad96..ba4ee5ff48 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_4db25c() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1u).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl index ddef4d92b9..2b58f65d9e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl index 28efe98902..c1f80e64d5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4db25c(depth2d_ms tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm index 27c710128d..32be0e4c10 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %uint_1 + %17 = OpImageFetch %v4float %18 %22 Sample %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn diff --git a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl index 467f37a00d..016d7b3d35 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4db25c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_4db25c() { - var res : f32 = textureLoad(arg_0, vec2(), 1u); + var res : f32 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl index fcc4f40ae2..0cab940b9c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_4fd803() { - var res: vec4 = textureLoad(arg_0, vec3(), 1i); + var res: vec4 = textureLoad(arg_0, vec3(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl index 2fe17706e5..6d0e1ca294 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_4fd803() { - int4 res = arg_0.Load(int4(0, 0, 0, 1)); + int4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl index 2fe17706e5..6d0e1ca294 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_4fd803() { - int4 res = arg_0.Load(int4(0, 0, 0, 1)); + int4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl index b5ca0697e5..6b6428cd85 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl index e72afeb87f..b3c9573113 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4fd803(texture3d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(int3(0)), 1); + int4 res = tint_symbol_1.read(uint3(int3(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm index a288c46784..09c742b7ea 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.spvasm @@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %25 = OpConstantNull %v4int %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %int_1 + %17 = OpImageFetch %v4int %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl index 55455591be..60d259ecb6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/4fd803.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_4fd803() { - var res : vec4 = textureLoad(arg_0, vec3(), 1i); + var res : vec4 = textureLoad(arg_0, vec3(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl index 86eb29746a..c02faf2f15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_53e142() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl index 7485817d40..3aa59fd1c8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_53e142() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl index 7485817d40..3aa59fd1c8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_53e142() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl index 60635a4b57..2784890752 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl index b7c7b22b8d..bff4dce709 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_53e142(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.spvasm index 47244e5d32..0d6f864a47 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,42 +39,46 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_53e142 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4uint %19 %25 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4uint %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_53e142 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_53e142 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_53e142 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_53e142 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_53e142 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_53e142 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl index 741a7f02f6..61ac9cd4dc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/53e142.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_53e142() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl index 0cd6406152..8709118ab3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_54a59b() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl index 37fc597661..05c3ea6496 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_54a59b() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl index 37fc597661..05c3ea6496 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_54a59b() { - float4 res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl index 1cbdc29a18..d0261ec86e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl index 05527a53fc..76de435386 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_54a59b(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm index 14f260165a..a74c27d717 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_54a59b = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - %16 = OpImageFetch %v4float %17 %24 Lod %int_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + %16 = OpImageFetch %v4float %17 %28 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_54a59b +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_54a59b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_54a59b + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_54a59b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_54a59b + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_54a59b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl index bf69b5d41d..501de96fc3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/54a59b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_54a59b() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl index 0e460bb154..6a412e6258 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_6154d4() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl index 1aedcd2f37..515b575fcb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_6154d4() { - uint4 res = arg_0.Load(int3(0, 0, 1)); + uint4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl index 1aedcd2f37..515b575fcb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_6154d4() { - uint4 res = arg_0.Load(int3(0, 0, 1)); + uint4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl index 017e004933..7ec67eafc2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl index d71292e341..26372cd626 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6154d4(texture2d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm index 5720f46604..9601d63760 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.spvasm @@ -40,8 +40,8 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %26 = OpConstantNull %v4uint %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl index 8238d07e8c..59fe73e7c9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6154d4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_6154d4() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl index 988633f473..a30de18ad1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: i32) -> f32 fn textureLoad_6273b1() { - var res: f32 = textureLoad(arg_0, vec2(), 1i); + var res: f32 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl index fafcd354be..599f9fb476 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6273b1() { - float res = arg_0.Load(int3(0, 0, 0), 1).x; + float res = arg_0.Load(int3((1).xx, 0), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl index fafcd354be..599f9fb476 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6273b1() { - float res = arg_0.Load(int3(0, 0, 0), 1).x; + float res = arg_0.Load(int3((1).xx, 0), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl index 3cfe2778a8..9da482cd80 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - float res = texelFetch(arg_0_1, ivec2(0), 1).x; + float res = texelFetch(arg_0_1, ivec2(1), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl index e39caca53d..fd32c2056d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6273b1(depth2d_ms tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm index 5db1880b9a..58aacb9420 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %int_1 + %17 = OpImageFetch %v4float %18 %22 Sample %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn diff --git a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl index 6c19c4a26c..ad54e192cc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6273b1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_6273b1() { - var res : f32 = textureLoad(arg_0, vec2(), 1i); + var res : f32 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl index 9311705093..464ee33c77 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_639962() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl index 42bb7f1541..135287e809 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_639962() { - int4 res = arg_0.Load((0u).xx, 1u); + int4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl index 42bb7f1541..135287e809 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_639962() { - int4 res = arg_0.Load((0u).xx, 1u); + int4 res = arg_0.Load((1u).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl index 40ede06137..b7f55c8ceb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl index c0022d9b54..ac9b81fd96 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_639962(texture2d_ms tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm index 2c8ccabc42..9dab4a0667 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.spvasm @@ -40,8 +40,8 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %26 = OpConstantNull %v4int %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Sample %uint_1 + %17 = OpImageFetch %v4int %19 %23 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl index f7aa89a4a9..1b4796905c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/639962.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_639962() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl index 11c7cb59a8..34e2fd1ac3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_656d76() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl index bf91da0964..3d3a154ed5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_656d76() { - uint4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl index bf91da0964..3d3a154ed5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_656d76() { - uint4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl index 3aad010ddf..28f6396623 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl index a992774c49..bc1b59847c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_656d76(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm index 0b2bd2bbdf..29e4722cad 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,41 +40,44 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %24 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %28 = OpConstantNull %v4uint - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_656d76 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %28 + %res = OpVariable %_ptr_Function_v4uint Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %24 Lod %uint_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpCompositeConstruct %v3int %25 %26 %int_1 + %17 = OpImageFetch %v4uint %19 %27 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_656d76 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_656d76 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_656d76 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureLoad_656d76 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_656d76 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl index a7a3ebd700..8f0880bfd8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/656d76.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_656d76() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl index 7014871ffd..88c87325d0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: u32) -> f32 fn textureLoad_66be47() { - var res: f32 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: f32 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl index 73885a2129..d8dfa1d68b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_66be47() { - float res = arg_0.Load(int4(0, 0, int(1u), int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl index 73885a2129..d8dfa1d68b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_66be47() { - float res = arg_0.Load(int4(0, 0, int(1u), int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl index f8185c16f1..5ae469fc07 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl index 17fef2ff11..f939f9890f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_66be47(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm index 990ebb09a7..75d29e2b07 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,46 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_66be47 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_66be47 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_66be47 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_66be47 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_66be47 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_66be47 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_66be47 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl index 1832e2997d..74559b9f50 100644 --- a/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/66be47.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_66be47() { - var res : f32 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : f32 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl index 2b8177e5a1..9ddd349843 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: u32) -> f32 fn textureLoad_6925bc() { - var res: f32 = textureLoad(arg_0, vec2(), 1u); + var res: f32 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl index ccd6a22dc0..f0c82ff79b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6925bc() { - float res = arg_0.Load(int3(0, 0, 0), 1u).x; + float res = arg_0.Load(int3((1).xx, 0), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl index ccd6a22dc0..f0c82ff79b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6925bc() { - float res = arg_0.Load(int3(0, 0, 0), 1u).x; + float res = arg_0.Load(int3((1).xx, 0), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl index 76b2acda48..0dec904df8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl index 97acbd30a0..2ffbebe58e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6925bc(depth2d_ms tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.spvasm index cda1ac2b97..7a5ea4eed9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6925bc = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %uint_1 + %17 = OpImageFetch %v4float %18 %22 Sample %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_6925bc +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_6925bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_6925bc + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_6925bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_6925bc + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_6925bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl index 14dd184f5e..e75432fcd2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6925bc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_6925bc() { - var res : f32 = textureLoad(arg_0, vec2(), 1u); + var res : f32 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl index 3ef29370c2..43e349ceb4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_6bf4b7() { - var res: vec4 = textureLoad(arg_0, vec3(), 1u); + var res: vec4 = textureLoad(arg_0, vec3(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl index 8012b526d8..8a41510b93 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_6bf4b7() { - uint4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + uint4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl index 8012b526d8..8a41510b93 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_6bf4b7() { - uint4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + uint4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl index 87a337c997..5ae612b817 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl index 0fa3b97733..ddac3e7737 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6bf4b7(texture3d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(int3(0)), 1u); + uint4 res = tint_symbol_1.read(uint3(int3(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm index 74c96d64a5..4f756fc891 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %22 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6bf4b7 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_6bf4b7 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_6bf4b7 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_6bf4b7 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl index 87ee760bd8..07d7ba621e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/6bf4b7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_6bf4b7() { - var res : vec4 = textureLoad(arg_0, vec3(), 1u); + var res : vec4 = textureLoad(arg_0, vec3(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl index 784ea18b6f..2e6d30ab71 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_714471() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl index c201b76c17..7982262d35 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_714471() { - int4 res = arg_0.Load(uint3(0u, 0u, 1u)); + int4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl index c201b76c17..7982262d35 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_714471() { - int4 res = arg_0.Load(uint3(0u, 0u, 1u)); + int4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl index 16a781cc7a..3131d479df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_714471() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_714471() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_714471() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl index dfe204fe8f..cf68b69d26 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_714471(texture2d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm index 845ee95957..12ce134d14 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.spvasm @@ -40,8 +40,8 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %26 = OpConstantNull %v4int %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl index b6f83de506..638bd91421 100644 --- a/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/714471.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_714471() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl index dcfb039419..a3698ed19b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_789045() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl index 7c7ed8def1..4ff5d93b51 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_789045() { - float4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl index 7c7ed8def1..4ff5d93b51 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_789045() { - float4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + float4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl index 9e596c1a92..4e4fbf8547 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl index 903adf9419..be0339ff36 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_789045(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm index 7398fc62dd..013a26014c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,44 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_789045 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %uint_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + %16 = OpImageFetch %v4float %17 %25 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_789045 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_789045 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_789045 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureLoad_789045 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_789045 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl index 10a00a23a5..d10427828b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/789045.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_789045() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl index 5e359e3d35..c966379722 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_79e697() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl index 336b2abb90..0c1d4282df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_79e697() { - int4 res = arg_0.Load(int4(0, 0, 1, 1)); + int4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl index 336b2abb90..0c1d4282df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_79e697() { - int4 res = arg_0.Load(int4(0, 0, 1, 1)); + int4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl index 4e5a1df904..82d11ca46d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl index 3e8f37de6b..cb7faf18a3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_79e697(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm index 8a90068900..3e48766748 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,43 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_79e697 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %29 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %23 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4int %19 %26 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_79e697 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_79e697 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_79e697 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %39 = OpLabel %40 = OpFunctionCall %void %textureLoad_79e697 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_79e697 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl index c2cda3dfa8..fd39584c1c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/79e697.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_79e697() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl index efd577e684..266c38907e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_7ab4df() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl index b6d28d8960..30e23b47de 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7ab4df() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl index b6d28d8960..30e23b47de 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7ab4df() { - uint4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl index ec80f3bfc0..66522c5d37 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl index b4ea0ffbda..f9e692452c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7ab4df(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm index 14ec9cc66d..5239cbedf8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 - %uint_1 = OpConstant %uint 1 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 + %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpConstantNull %v4uint - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7ab4df = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %23 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %23 - %17 = OpImageFetch %v4uint %19 %25 Lod %int_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %25 %26 %27 + %17 = OpImageFetch %v4uint %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_7ab4df +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_7ab4df OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_7ab4df - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %42 = OpLabel %43 = OpFunctionCall %void %textureLoad_7ab4df OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_7ab4df + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl index 1641a45572..5377bd375c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7ab4df.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_7ab4df() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl index 0c629f18a2..beea60d394 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: u32) -> f32 fn textureLoad_7b63e0() { - var res: f32 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: f32 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl index fd429fc3b3..824476147e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7b63e0() { - float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl index fd429fc3b3..824476147e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7b63e0() { - float res = arg_0.Load(uint4(0u, 0u, 1u, 1u)).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl index 9e3335b2be..ff50479aa8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl index 16c38834f3..9abd6c717c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7b63e0(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm index 7619398adf..6656cd02b1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7b63e0 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4float %18 %26 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_7b63e0 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureLoad_7b63e0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_7b63e0 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %38 = OpLabel %39 = OpFunctionCall %void %textureLoad_7b63e0 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_7b63e0 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl index 9f9e633d10..239a5440bc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7b63e0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_7b63e0() { - var res : f32 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : f32 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl index 9f17dfd2ca..748948b85c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_7bee94() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl index 637feddb4a..693590e1a0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_7bee94() { - int4 res = arg_0.Load((0u).xx, 1); + int4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl index 637feddb4a..693590e1a0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_7bee94() { - int4 res = arg_0.Load((0u).xx, 1); + int4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl index 0b65e8bdf6..bfebea4b33 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl index 3b6dd3b8ef..dfa9ee39b4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7bee94(texture2d_ms tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm index 6cebf8883a..e0dee27ea3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7bee94 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Sample %int_1 + %17 = OpImageFetch %v4int %19 %23 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_7bee94 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_7bee94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_7bee94 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_7bee94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_7bee94 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_7bee94 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl index a0dce1f326..8c3319992b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7bee94.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_7bee94() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl index 83f84c1647..8964b4843c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_7c90e5() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl index 789b7c22b5..2f4abe7cb8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7c90e5() { - uint4 res = arg_0.Load(int4(0, 0, 1, 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl index 789b7c22b5..2f4abe7cb8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7c90e5() { - uint4 res = arg_0.Load(int4(0, 0, 1, 1)); + uint4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl index f215804e63..1df83b031d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl index 845b819250..234f4e9f29 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7c90e5(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.spvasm index eca27147ed..03d6263c9a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,40 +40,43 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %24 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %27 = OpConstantNull %v4uint - %28 = OpTypeFunction %v4float + %30 = OpConstantNull %v4uint + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7c90e5 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %30 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %24 Lod %int_1 + %25 = OpCompositeExtract %int %24 0 + %26 = OpCompositeExtract %int %24 1 + %27 = OpCompositeConstruct %v3int %25 %26 %int_1 + %17 = OpImageFetch %v4uint %19 %27 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_7c90e5 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_7c90e5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_7c90e5 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %40 = OpLabel %41 = OpFunctionCall %void %textureLoad_7c90e5 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_7c90e5 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl index 4e9bfb5339..4a75a29c4c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7c90e5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_7c90e5() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl index 114529e434..70a97799c4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: i32) -> f32 fn textureLoad_7fd822() { - var res: f32 = textureLoad(arg_0, vec2(), 1i); + var res: f32 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl index c7fda0ba66..873d58f8c9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_7fd822() { - float res = arg_0.Load(uint3(0u, 0u, uint(1))).x; + float res = arg_0.Load(uint3((1u).xx, uint(1))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl index c7fda0ba66..873d58f8c9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_7fd822() { - float res = arg_0.Load(uint3(0u, 0u, uint(1))).x; + float res = arg_0.Load(uint3((1u).xx, uint(1))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl index 190b3ba97b..fd8f54850e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl index ae2db23483..6d825c1009 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7fd822(depth2d tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.spvasm index afc51da6d3..8eb5347a66 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7fd822 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %int_1 + %17 = OpImageFetch %v4float %18 %22 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_7fd822 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_7fd822 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_7fd822 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_7fd822 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_7fd822 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_7fd822 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl index 27d783fb27..8085a1c91b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/7fd822.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_7fd822() { - var res : f32 = textureLoad(arg_0, vec2(), 1i); + var res : f32 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl index 8a5789423e..d2acc4240f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_84dee1() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl index 44ec101e42..ff8c0414d0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_84dee1() { - float4 res = arg_0.Load(uint3(0u, 0u, 1u)); + float4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl index 44ec101e42..ff8c0414d0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_84dee1() { - float4 res = arg_0.Load(uint3(0u, 0u, 1u)); + float4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl index 61255d3825..7591aea9a2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl index f4878444b7..f078b1134d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_84dee1(texture2d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm index 06cffb754d..0ec3c1c958 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %uint_1 + %16 = OpImageFetch %v4float %17 %21 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl index 8c71828ab5..208a704bcf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/84dee1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_84dee1() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl index 30e2321180..538bce5812 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_8527b1() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl index 996ba2b1b2..efe66758fc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_8527b1() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl index 996ba2b1b2..efe66758fc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_8527b1() { - uint4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl index d8b25ad5aa..b2dd9c55cd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl index 925232ebe2..90a940f99e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_8527b1(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm index a5774fcb12..a76115831a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,43 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_8527b1 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %29 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4uint %19 %26 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_8527b1 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_8527b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_8527b1 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %39 = OpLabel %40 = OpFunctionCall %void %textureLoad_8527b1 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_8527b1 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl index 0c8f290199..b54aad1f45 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8527b1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_8527b1() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl index 764a1c56f4..8d2249ec6d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_87be85() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl index 630c1d1fbc..46729c6601 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_87be85() { - float4 res = arg_0.Load(int4(0, 0, 1, 1)); + float4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl index 630c1d1fbc..46729c6601 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_87be85() { - float4 res = arg_0.Load(int4(0, 0, 1, 1)); + float4 res = arg_0.Load(int4(int3((1).xx, 1), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl index 4d27344771..29b97900dd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - vec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1); + vec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl index 7d1b36f8a6..91e436d5b8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_87be85(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm index 398d48c916..cf811e4e70 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,42 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_87be85 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %int_1 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + %16 = OpImageFetch %v4float %17 %25 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_87be85 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_87be85 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_87be85 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %37 = OpLabel %38 = OpFunctionCall %void %textureLoad_87be85 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_87be85 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl index 1aa41cb557..d99ca4e251 100644 --- a/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/87be85.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_87be85() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl index 1f056a2e03..4e672d36f1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_897cf3() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl index c099bb5469..af0a0d273c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_897cf3() { - uint4 res = arg_0.Load(uint3(0u, 0u, 1u)); + uint4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl index c099bb5469..af0a0d273c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_897cf3() { - uint4 res = arg_0.Load(uint3(0u, 0u, 1u)); + uint4 res = arg_0.Load(uint3((1u).xx, 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl index e77f26bffd..cf52a146af 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl index dfbe3e3cc4..d0a6e4175b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_897cf3(texture2d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm index d6fb44d2e0..1203f249d6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.spvasm @@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %25 = OpConstantNull %v4uint %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl index 4acf456031..abaebd31da 100644 --- a/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/897cf3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_897cf3() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl index c0a16ad858..7b35415ed0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_external, coords: vec2) -> vec4 fn textureLoad_8acf41() { - var res: vec4 = textureLoad(arg_0, vec2()); + var res: vec4 = textureLoad(arg_0, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl index 33ee4979cd..ef621cb5b7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.dxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_8acf41() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl index 33ee4979cd..ef621cb5b7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.fxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_8acf41() { - float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (0).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, (1).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl index 2667743d90..88a7e3ed57 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.glsl @@ -49,7 +49,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(0), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner); } vec4 vertex_main() { @@ -117,7 +117,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(0), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner); } void fragment_main() { @@ -179,7 +179,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(0), ext_tex_params.inner); + vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, ivec2(1), ext_tex_params.inner); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl index 617b8dfe53..93bf9c8536 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.msl @@ -58,7 +58,7 @@ float4 textureLoadExternal(texture2d plane0, texture2d tint_symbol_1, texture2d tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) { - float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, int2(0), *(tint_symbol_3)); + float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, int2(1), *(tint_symbol_3)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm index 6eba59e22f..9929412c4c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 138 +; Bound: 139 ; Schema: 0 OpCapability Shader %28 = OpExtInstImport "GLSL.std.450" @@ -114,11 +114,12 @@ %93 = OpConstantNull %uint %void = OpTypeVoid %111 = OpTypeFunction %void - %118 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %119 = OpConstantComposite %v2int %int_1 %int_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %125 = OpTypeFunction %v4float + %126 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %22 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -215,31 +216,31 @@ %res = OpVariable %_ptr_Function_v4float Function %5 %116 = OpLoad %11 %arg_0 %117 = OpLoad %11 %ext_tex_plane_1 - %121 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %122 = OpLoad %ExternalTextureParams %121 - %115 = OpFunctionCall %v4float %textureLoadExternal %116 %117 %118 %122 + %122 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %123 = OpLoad %ExternalTextureParams %122 + %115 = OpFunctionCall %v4float %textureLoadExternal %116 %117 %119 %123 OpStore %res %115 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %125 - %127 = OpLabel - %128 = OpFunctionCall %void %textureLoad_8acf41 +%vertex_main_inner = OpFunction %v4float None %126 + %128 = OpLabel + %129 = OpFunctionCall %void %textureLoad_8acf41 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %111 - %130 = OpLabel - %131 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %131 + %131 = OpLabel + %132 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %132 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %111 - %133 = OpLabel - %134 = OpFunctionCall %void %textureLoad_8acf41 + %134 = OpLabel + %135 = OpFunctionCall %void %textureLoad_8acf41 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %111 - %136 = OpLabel - %137 = OpFunctionCall %void %textureLoad_8acf41 + %137 = OpLabel + %138 = OpFunctionCall %void %textureLoad_8acf41 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl index 9539b700e5..5577b26b88 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8acf41.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_external; fn textureLoad_8acf41() { - var res : vec4 = textureLoad(arg_0, vec2()); + var res : vec4 = textureLoad(arg_0, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl index b5d0434954..436c43ad1b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: u32) -> f32 fn textureLoad_8ccbe3() { - var res: f32 = textureLoad(arg_0, vec2(), 1u); + var res: f32 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl index 6f96b70fb4..bd1f283124 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_8ccbe3() { - float res = arg_0.Load(int3(0, 0, int(1u))).x; + float res = arg_0.Load(int3((1).xx, int(1u))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl index 6f96b70fb4..bd1f283124 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_8ccbe3() { - float res = arg_0.Load(int3(0, 0, int(1u))).x; + float res = arg_0.Load(int3((1).xx, int(1u))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl index ece7afb1e1..d700b3eb18 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - float res = texelFetch(arg_0_1, ivec2(0), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(1), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl index ac493edfce..b53534ccb2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_8ccbe3(depth2d tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.spvasm index 74a1be6a4b..4333057dae 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_8ccbe3 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %uint_1 + %17 = OpImageFetch %v4float %18 %22 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_8ccbe3 +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_8ccbe3 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_8ccbe3 + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl index ed51a5ed20..3128d1ed54 100644 --- a/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/8ccbe3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_8ccbe3() { - var res : f32 = textureLoad(arg_0, vec2(), 1u); + var res : f32 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl index caf722534b..75a6136329 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_92eb1f() { - var res: vec4 = textureLoad(arg_0, vec3(), 1i); + var res: vec4 = textureLoad(arg_0, vec3(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl index f6223be542..27f26d4a70 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_92eb1f() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl index f6223be542..27f26d4a70 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_92eb1f() { - uint4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl index 17377b3545..03a01dceaa 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl index 1ccb3825d6..a71ae9c459 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_92eb1f(texture3d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(uint3(0u)), 1); + uint4 res = tint_symbol_1.read(uint3(uint3(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm index 0660252f95..f9adb7a22a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_92eb1f = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_92eb1f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_92eb1f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_92eb1f + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_92eb1f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_92eb1f + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_92eb1f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl index e6000a205e..a09f3b3406 100644 --- a/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/92eb1f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_92eb1f() { - var res : vec4 = textureLoad(arg_0, vec3(), 1i); + var res : vec4 = textureLoad(arg_0, vec3(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl index 2a5a5d7521..6702db20bd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_96efd5() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl index 67c4f1b20f..d31d27a576 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_96efd5() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl index 67c4f1b20f..d31d27a576 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_96efd5() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl index f3f8f1719a..93f63df077 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl index 3f9f55fd6c..68bce435d9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_96efd5(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm index e75371c098..95d4da60f4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,42 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_96efd5 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %uint_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + %16 = OpImageFetch %v4float %17 %25 Lod %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_96efd5 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_96efd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_96efd5 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %37 = OpLabel %38 = OpFunctionCall %void %textureLoad_96efd5 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_96efd5 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl index d6f1fec08f..c335e7c500 100644 --- a/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/96efd5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_96efd5() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl index 7932e4ffc3..41979d99a3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_9885b0() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl index 1362ee58be..a284ba8392 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9885b0() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl index 1362ee58be..a284ba8392 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9885b0() { - int4 res = arg_0.Load(uint4(0u, 0u, 1u, 1u)); + int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl index 37d02a36a5..8ae90746e4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl index 9962116e29..843028cf42 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9885b0(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1u); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm index 4f1bcb5e95..95cbcb3626 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,40 +40,43 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %24 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %24 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %27 = OpConstantNull %v4int - %28 = OpTypeFunction %v4float + %30 = OpConstantNull %v4int + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9885b0 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %27 + %res = OpVariable %_ptr_Function_v4int Function %30 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %24 Lod %uint_1 + %25 = OpCompositeExtract %uint %24 0 + %26 = OpCompositeExtract %uint %24 1 + %27 = OpCompositeConstruct %v3uint %25 %26 %uint_1 + %17 = OpImageFetch %v4int %19 %27 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_9885b0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_9885b0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_9885b0 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %40 = OpLabel %41 = OpFunctionCall %void %textureLoad_9885b0 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_9885b0 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl index 0c52bf4791..5f84bebbe3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9885b0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_9885b0() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl index 35fef29277..80fb11e6b2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_9aa733() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl index 79162bd507..8862e3e5fc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9aa733() { - int4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + int4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl index 79162bd507..8862e3e5fc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9aa733() { - int4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + int4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl index 217cfa1540..79c181bbf6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl index 961e4e3d89..b15985180d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9aa733(texture2d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm index 6e614d22d6..d58cf9e0c9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4int = OpTypeVector %int 4 %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %22 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9aa733 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %22 Lod %int_1 + %17 = OpImageFetch %v4int %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_9aa733 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_9aa733 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_9aa733 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_9aa733 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_9aa733 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_9aa733 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl index 10a785e96e..16e206d122 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9aa733.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_9aa733() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl index 5949f7d2f7..d3628cefeb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: i32) -> f32 fn textureLoad_9b2667() { - var res: f32 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: f32 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl index a17fb571c1..6504431f0d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9b2667() { - float res = arg_0.Load(int4(0, 0, 1, 1)).x; + float res = arg_0.Load(int4(int3((1).xx, 1), 1)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl index a17fb571c1..6504431f0d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9b2667() { - float res = arg_0.Load(int4(0, 0, 1, 1)).x; + float res = arg_0.Load(int4(int3((1).xx, 1), 1)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl index bc2e629bf7..6b28c51fe1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl index 5b2788dbd6..594a5722e1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9b2667(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1, 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.spvasm index 7b9900388d..83123f0228 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %29 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9b2667 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4float %18 %26 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_9b2667 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureLoad_9b2667 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_9b2667 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %38 = OpLabel %39 = OpFunctionCall %void %textureLoad_9b2667 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_9b2667 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl index 16ef986fa9..1cf5e1cc3b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9b2667.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_9b2667() { - var res : f32 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : f32 = textureLoad(arg_0, vec2(1i), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl index e666bb0b1d..0902bff940 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_9d70e9() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl index 0e3ab669f6..0f72bb79e6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9d70e9() { - int4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl index 0e3ab669f6..0f72bb79e6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9d70e9() { - int4 res = arg_0.Load(int4(0, 0, 1, int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, 1), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl index 3d13c6912b..9db544521a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl index da979334eb..4571e17e93 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9d70e9(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm index ef88f718de..935921caff 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,42 +39,45 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %31 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9d70e9 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %31 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %23 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4int %19 %26 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_9d70e9 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_9d70e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_9d70e9 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureLoad_9d70e9 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_9d70e9 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl index d1bbb29562..4e4002382c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9d70e9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_9d70e9() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl index d14a73309e..d371de402e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: u32) -> f32 fn textureLoad_9ed19e() { - var res: f32 = textureLoad(arg_0, vec2(), 1u); + var res: f32 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl index 589c8755d9..097458e7de 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9ed19e() { - float res = arg_0.Load(uint3(0u, 0u, 1u)).x; + float res = arg_0.Load(uint3((1u).xx, 1u)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl index 589c8755d9..097458e7de 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9ed19e() { - float res = arg_0.Load(uint3(0u, 0u, 1u)).x; + float res = arg_0.Load(uint3((1u).xx, 1u)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl index a973885bd3..3e9d565643 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), int(1u)).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl index 0e15d47aaa..e602994c3f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9ed19e(depth2d tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm index c4d6e10b7d..1732f243a2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_float = OpTypePointer Function %float %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Lod %uint_1 + %17 = OpImageFetch %v4float %18 %22 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn diff --git a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl index a4f6f1fed8..616cbee609 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9ed19e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_9ed19e() { - var res : f32 = textureLoad(arg_0, vec2(), 1u); + var res : f32 = textureLoad(arg_0, vec2(1u), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl index 1cd4b7729d..83c3e93f22 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_9fbfd9() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl index cc0b7411cf..80664b9488 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9fbfd9() { - int4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl index cc0b7411cf..80664b9488 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9fbfd9() { - int4 res = arg_0.Load(int4(0, 0, int(1u), int(1u))); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl index 8cdbcc7025..56966fe926 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl index 4c392b8683..3ce02b09e3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9fbfd9(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.spvasm index b76f91aaa7..d7b72c9b35 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,42 +39,46 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %28 = OpConstantNull %v4int - %29 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9fbfd9 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %28 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4int %19 %25 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4int %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_9fbfd9 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_9fbfd9 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_9fbfd9 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl index 6de6866c5e..de62644f4e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/9fbfd9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_9fbfd9() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl index 6b197d80a4..ac921a3d46 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_a24be1() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl index 1570879541..bb3431e972 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_a24be1() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl index 1570879541..bb3431e972 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_a24be1() { - uint4 res = arg_0.Load(uint4(0u, 0u, uint(1), 1u)); + uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), 1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl index 1e9bb6ca90..f0ccba153e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl index c025426ced..d23a41d827 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a24be1(texture2d_array tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1u); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm index 4182dea937..76b41b48e3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,43 +39,46 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpConstantNull %v4uint - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4uint + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_a24be1 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4uint %19 %25 Lod %uint_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4uint %19 %29 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_a24be1 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_a24be1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_a24be1 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %42 = OpLabel %43 = OpFunctionCall %void %textureLoad_a24be1 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_a24be1 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl index e93857469a..626e827000 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a24be1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_a24be1() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl index 5a7af60a80..ecf3176b3f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_a583c9() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl index e7bcc429b5..899ff24459 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_a583c9() { - float4 res = arg_0.Load((0).xx, 1); + float4 res = arg_0.Load((1).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl index e7bcc429b5..899ff24459 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_a583c9() { - float4 res = arg_0.Load((0).xx, 1); + float4 res = arg_0.Load((1).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl index af89b5f293..946647d024 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - vec4 res = texelFetch(arg_0_1, ivec2(0), 1); + vec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl index 7bcc2d6b2a..a80c05edb0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a583c9(texture2d_ms tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm index 92defe1d6a..e87546e43f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.spvasm @@ -38,8 +38,8 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 @@ -47,7 +47,7 @@ %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %int_1 + %16 = OpImageFetch %v4float %17 %21 Sample %int_1 OpStore %res %16 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl index 4fadbce468..14a43a6f38 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a583c9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_a583c9() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl index 8618d3c432..200ddd1c15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_a9a9f5() { - var res: vec4 = textureLoad(arg_0, vec3(), 1i); + var res: vec4 = textureLoad(arg_0, vec3(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl index 9673f0eb1f..49cda158b2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_a9a9f5() { - uint4 res = arg_0.Load(int4(0, 0, 0, 1)); + uint4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl index 9673f0eb1f..49cda158b2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_a9a9f5() { - uint4 res = arg_0.Load(int4(0, 0, 0, 1)); + uint4 res = arg_0.Load(int4((1).xxx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl index 6749d78125..aa54ff32d2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - uvec4 res = texelFetch(arg_0_1, ivec3(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec3(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl index 16840f0f18..f6c9bdb459 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a9a9f5(texture3d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint3(int3(0)), 1); + uint4 res = tint_symbol_1.read(uint3(int3(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm index c635f15e9e..0c420028d8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.spvasm @@ -40,8 +40,8 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %22 = OpConstantNull %v3int %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %26 = OpConstantNull %v4uint %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl index 03686f0161..f6df3505a0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/a9a9f5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_a9a9f5() { - var res : vec4 = textureLoad(arg_0, vec3(), 1i); + var res : vec4 = textureLoad(arg_0, vec3(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl index 0430762089..3dfd2f1962 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_b29f71() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl index 6e13a635a6..3a5de15071 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b29f71() { - int4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl index 6e13a635a6..3a5de15071 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b29f71() { - int4 res = arg_0.Load(int4(0, 0, int(1u), 1)); + int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl index 68402f9ce5..f6920c3582 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec4 res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1); + ivec4 res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl index 2ee5823d92..9a490973f5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b29f71(texture2d_array tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm index dc7ad1cc64..8df6b916fe 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,43 +39,46 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpConstantNull %v4int - %30 = OpTypeFunction %v4float + %32 = OpConstantNull %v4int + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b29f71 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %32 %19 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4int %19 %25 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4int %19 %29 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureLoad_b29f71 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_b29f71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_b29f71 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %42 = OpLabel %43 = OpFunctionCall %void %textureLoad_b29f71 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_b29f71 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl index ff9172d303..c83bd68050 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b29f71.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_b29f71() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl index 38393953ba..68177d19f1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: i32) -> f32 fn textureLoad_b6ba5d() { - var res: f32 = textureLoad(arg_0, vec2(), 1i, 1i); + var res: f32 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl index e01eb1dd57..3631e3be3e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b6ba5d() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl index e01eb1dd57..3631e3be3e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b6ba5d() { - float res = arg_0.Load(uint4(0u, 0u, uint(1), uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(1))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl index aa48aaba0c..183125feb8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, uint(1))), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), uint(1))), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl index e2c7340817..965aea7305 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b6ba5d(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1, 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm index d0063b953f..f93a99a150 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,46 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b6ba5d = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %25 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %29 = OpCompositeConstruct %v3uint %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_b6ba5d +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_b6ba5d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_b6ba5d + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_b6ba5d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_b6ba5d + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_b6ba5d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl index 03eb225290..bb45604174 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b6ba5d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_b6ba5d() { - var res : f32 = textureLoad(arg_0, vec2(), 1i, 1i); + var res : f32 = textureLoad(arg_0, vec2(1u), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl index 23f48da64e..7b360ac860 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_b73f6b() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl index 9d694aae08..40bf70cbc3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_b73f6b() { - uint4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl index 9d694aae08..40bf70cbc3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_b73f6b() { - uint4 res = arg_0.Load(uint3(0u, 0u, uint(1))); + uint4 res = arg_0.Load(uint3((1u).xx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl index b9f8285905..9129c98770 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl index 2515e7f906..fb6414e8c7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b73f6b(texture2d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm index 991603feb5..c258b1f863 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b73f6b = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Lod %int_1 + %17 = OpImageFetch %v4uint %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_b73f6b +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_b73f6b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_b73f6b + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_b73f6b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_b73f6b + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_b73f6b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl index 074690f144..fbfde8a595 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b73f6b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_b73f6b() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl index 6a6a232217..7c1b11c843 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_b75d4a() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl index 1b77601750..8d6034b508 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_b75d4a() { - float4 res = arg_0.Load((0).xx, 1u); + float4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl index 1b77601750..8d6034b508 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_b75d4a() { - float4 res = arg_0.Load((0).xx, 1u); + float4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl index 29de15d6dd..c73b745507 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - vec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + vec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl index cb1c017417..9e6c646de2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b75d4a(texture2d_ms tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + float4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.spvasm index 56442d6ffb..2c00abcae5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b75d4a = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %uint_1 + %16 = OpImageFetch %v4float %17 %21 Sample %uint_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_b75d4a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_b75d4a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_b75d4a + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_b75d4a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_b75d4a + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_b75d4a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl index 9a592a64b0..e0ac92cfbd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/b75d4a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_b75d4a() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl index ae600b1f95..72bc65ac2e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_bcbb3c() { - var res: vec4 = textureLoad(arg_0, vec3(), 1i); + var res: vec4 = textureLoad(arg_0, vec3(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl index 8a88e0f1a9..d1270b1460 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_bcbb3c() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + float4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl index 8a88e0f1a9..d1270b1460 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_bcbb3c() { - float4 res = arg_0.Load(uint4(0u, 0u, 0u, uint(1))); + float4 res = arg_0.Load(uint4((1u).xxx, uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl index 008c403346..12d153273e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl index c22a9b9548..bb6243e059 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_bcbb3c(texture3d tint_symbol_1) { - float4 res = tint_symbol_1.read(uint3(uint3(0u)), 1); + float4 res = tint_symbol_1.read(uint3(uint3(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.spvasm index 637018c53f..f73237b535 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_bcbb3c = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Lod %int_1 + %16 = OpImageFetch %v4float %17 %21 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_bcbb3c +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_bcbb3c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_bcbb3c + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_bcbb3c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_bcbb3c + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_bcbb3c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl index a968218d4b..6760114f80 100644 --- a/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/bcbb3c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_bcbb3c() { - var res : vec4 = textureLoad(arg_0, vec3(), 1i); + var res : vec4 = textureLoad(arg_0, vec3(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl index 75e82893a3..c653ca5cd3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: i32) -> f32 fn textureLoad_c16e00() { - var res: f32 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: f32 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl index 322a9ec415..2cc06f6eed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_c16e00() { - float res = arg_0.Load(int4(0, 0, int(1u), 1)).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl index 322a9ec415..2cc06f6eed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_c16e00() { - float res = arg_0.Load(int4(0, 0, int(1u), 1)).x; + float res = arg_0.Load(int4(int3((1).xx, int(1u)), 1)).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl index 62fbdb9523..3871cbc6d9 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - float res = texelFetch(arg_0_1, ivec3(0, 0, int(1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), int(1u)), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl index 8159c0f0e3..017235918c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c16e00(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1u, 1); + float res = tint_symbol_1.read(uint2(int2(1)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm index 64906d9449..a26dedc67e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,43 +38,46 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_c16e00 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %25 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - %17 = OpImageFetch %v4float %18 %25 Lod %int_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %29 = OpCompositeConstruct %v3int %24 %25 %26 + %17 = OpImageFetch %v4float %18 %29 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureLoad_c16e00 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_c16e00 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_c16e00 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %41 = OpLabel %42 = OpFunctionCall %void %textureLoad_c16e00 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_c16e00 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl index 6a7cf77505..a2b063be2f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c16e00.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_c16e00() { - var res : f32 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : f32 = textureLoad(arg_0, vec2(1i), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl index 5b373acfcf..a112e759d7 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_c2a480() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl index 4d4bde4949..12025bfad0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_c2a480() { - int4 res = arg_0.Load(int3(0, 0, 1)); + int4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl index 4d4bde4949..12025bfad0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_c2a480() { - int4 res = arg_0.Load(int3(0, 0, 1)); + int4 res = arg_0.Load(int3((1).xx, 1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl index 3e70878da4..cb7e8df35a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl index 0088df6e76..ca4ac4ea15 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c2a480(texture2d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm index 36ee782e68..c5f992425b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.spvasm @@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %25 = OpConstantNull %v4int %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %int_1 + %17 = OpImageFetch %v4int %19 %22 Lod %int_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl index 3f1aefedf4..3e94689beb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c2a480.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_c2a480() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl index 618ca493fc..a1cc531a31 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_c378ee() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl index fc7d1b6b7b..1d70b9162c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_c378ee() { - uint4 res = arg_0.Load((0).xx, 1); + uint4 res = arg_0.Load((1).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl index fc7d1b6b7b..1d70b9162c 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_c378ee() { - uint4 res = arg_0.Load((0).xx, 1); + uint4 res = arg_0.Load((1).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl index cdb2ca09bc..7578fc02fa 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl index efdc2c2b22..5d9e9803ed 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c378ee(texture2d_ms tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm index 7190f7877c..67eaa27997 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.spvasm @@ -40,8 +40,8 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint %26 = OpConstantNull %v4uint %27 = OpTypeFunction %v4float @@ -50,7 +50,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4uint Function %26 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Sample %int_1 + %17 = OpImageFetch %v4uint %19 %23 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl index 2f84fbc65e..3a19878524 100644 --- a/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/c378ee.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_c378ee() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl index 25ac31774d..21d4579c83 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_cad5f2() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl index 0f93cc8703..35323e9d54 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_cad5f2() { - uint4 res = arg_0.Load((0).xx, 1u); + uint4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl index 0f93cc8703..35323e9d54 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_cad5f2() { - uint4 res = arg_0.Load((0).xx, 1u); + uint4 res = arg_0.Load((1).xx, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl index 9e82ddf36e..212df3b66e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl index 8cc1c1b734..d2d03a0ee2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_cad5f2(texture2d_ms tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm index 70978469bb..770f50bc12 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_cad5f2 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Sample %uint_1 + %17 = OpImageFetch %v4uint %19 %23 Sample %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_cad5f2 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_cad5f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_cad5f2 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_cad5f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_cad5f2 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_cad5f2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl index 1420f613b2..c1ff4e1c01 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cad5f2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_cad5f2() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl index 89a146bebd..b2a49a0c20 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: i32) -> f32 fn textureLoad_cb57c2() { - var res: f32 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: f32 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl index 79442d0182..17a6eb81db 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_cb57c2() { - float res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl index 79442d0182..17a6eb81db 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_cb57c2() { - float res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))).x; + float res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl index f71215d89f..1b6e405443 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - float res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1).x; + float res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl index 893d800174..9b10a8a7b0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_cb57c2(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.spvasm index 68a2176e2b..aabd47f76e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_cb57c2 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %int_1 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + %17 = OpImageFetch %v4float %18 %26 Lod %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_cb57c2 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_cb57c2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_cb57c2 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %40 = OpLabel %41 = OpFunctionCall %void %textureLoad_cb57c2 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_cb57c2 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl index 3cd1cd35ea..8aa33edc55 100644 --- a/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/cb57c2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_cb57c2() { - var res : f32 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : f32 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl index 68abe1f9fd..785f37c9a0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_e35f72() { - var res: vec4 = textureLoad(arg_0, vec3(), 1u); + var res: vec4 = textureLoad(arg_0, vec3(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl index de8d7fed76..314a8cda08 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_e35f72() { - int4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + int4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl index de8d7fed76..314a8cda08 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_e35f72() { - int4 res = arg_0.Load(int4(0, 0, 0, int(1u))); + int4 res = arg_0.Load(int4((1).xxx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl index 0117c1a17d..c76b1951d6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec4 res = texelFetch(arg_0_1, ivec3(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec3(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl index d26d3580a3..8d90d9d680 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_e35f72(texture3d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint3(int3(0)), 1u); + int4 res = tint_symbol_1.read(uint3(int3(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm index 69920c5881..d2e44af0fc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_e35f72 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_e35f72 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_e35f72 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_e35f72 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_e35f72 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_e35f72 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_e35f72 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl index 2e8197d79e..9f982115be 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e35f72.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_e35f72() { - var res : vec4 = textureLoad(arg_0, vec3(), 1u); + var res : vec4 = textureLoad(arg_0, vec3(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl index 1869efe323..5f75cfc68b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_e3d2cc() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl index 6d097d4597..e6d2e5474a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_e3d2cc() { - int4 res = arg_0.Load((0).xx, 1); + int4 res = arg_0.Load((1).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl index 6d097d4597..e6d2e5474a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_e3d2cc() { - int4 res = arg_0.Load((0).xx, 1); + int4 res = arg_0.Load((1).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl index 7dc1ade680..0a3f39b71d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), 1); + ivec4 res = texelFetch(arg_0_1, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl index 024057e13d..219ced80b1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_e3d2cc(texture2d_ms tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm index 87d98ce5d6..b675216dc1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.spvasm @@ -39,8 +39,8 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int %25 = OpConstantNull %v4int %26 = OpTypeFunction %v4float @@ -49,7 +49,7 @@ %16 = OpLabel %res = OpVariable %_ptr_Function_v4int Function %25 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Sample %int_1 + %17 = OpImageFetch %v4int %19 %22 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl index d41a2bb242..bcca84f217 100644 --- a/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/e3d2cc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_e3d2cc() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl index 4ee85a0192..a148c96e27 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_ebfb92() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl index ef22fda3d9..b5068f8593 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_ebfb92() { - uint4 res = arg_0.Load(int3(0, 0, int(1u))); + uint4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl index ef22fda3d9..b5068f8593 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_ebfb92() { - uint4 res = arg_0.Load(int3(0, 0, int(1u))); + uint4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl index 6176e8da9e..3304740750 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - uvec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + uvec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl index 1310118db8..150e05fbf3 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_ebfb92(texture2d tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm index 4e03907e21..2d2b7c1edf 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,39 +40,40 @@ %v4uint = OpTypeVector %uint 4 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_ebfb92 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %22 Lod %uint_1 + %17 = OpImageFetch %v4uint %19 %23 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_ebfb92 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_ebfb92 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_ebfb92 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_ebfb92 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_ebfb92 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_ebfb92 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl index c2dd172afe..ba62a2d0b2 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ebfb92.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_ebfb92() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl index 96f2bcae03..c40b0989fb 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_f0abad() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl index 061233683c..87dd503085 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_f0abad() { - float4 res = arg_0.Load((0u).xx, 1); + float4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl index 061233683c..87dd503085 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_f0abad() { - float4 res = arg_0.Load((0u).xx, 1); + float4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl index d5d441c8f1..e3f38e316e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - vec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + vec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl index 75cdfbf49a..cb62355504 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f0abad(texture2d_ms tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.spvasm index e60070d875..2ee3f4d638 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,39 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpTypeFunction %v4float + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f0abad = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %20 Sample %int_1 + %16 = OpImageFetch %v4float %17 %21 Sample %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureLoad_f0abad +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureLoad_f0abad OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_f0abad + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_f0abad OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_f0abad + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_f0abad OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl index f422c024a5..39a67433a5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f0abad.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_f0abad() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl index 105dab7b17..8ded634433 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_f348d9() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl index cc20744e72..3ed4094de1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_f348d9() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl index cc20744e72..3ed4094de1 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_f348d9() { - float4 res = arg_0.Load(uint4(0u, 0u, 1u, uint(1))); + float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl index 9302278868..8ee158abde 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - vec4 res = texelFetch(arg_0_1, ivec3(uvec3(0u, 0u, 1u)), 1); + vec4 res = texelFetch(arg_0_1, ivec3(uvec3(uvec2(1u), 1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl index 65f4407dbf..fc4b0591f5 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f348d9(texture2d_array tint_symbol_1) { - float4 res = tint_symbol_1.read(uint2(uint2(0u)), 1u, 1); + float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm index 0c617c7b55..dda8c12ef8 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,41 +38,44 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f348d9 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %17 = OpLoad %11 %arg_0 - %16 = OpImageFetch %v4float %17 %22 Lod %int_1 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + %16 = OpImageFetch %v4float %17 %25 Lod %int_1 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_f348d9 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureLoad_f348d9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_f348d9 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureLoad_f348d9 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_f348d9 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl index 7b599f1a87..e36ca4787e 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f348d9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_f348d9() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u, 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl index fcd1f60382..deaef28e20 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_f85291() { - var res: vec4 = textureLoad(arg_0, vec2(), 1u); + var res: vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl index 2f163b0656..f506fc9ce4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_f85291() { - int4 res = arg_0.Load(int3(0, 0, int(1u))); + int4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl index 2f163b0656..f506fc9ce4 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_f85291() { - int4 res = arg_0.Load(int3(0, 0, int(1u))); + int4 res = arg_0.Load(int3((1).xx, int(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl index 80515394af..7aaf2b6422 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec4 res = texelFetch(arg_0_1, ivec2(0), int(1u)); + ivec4 res = texelFetch(arg_0_1, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl index 5c0fefdedd..4a0ede2380 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f85291(texture2d tint_symbol_1) { - int4 res = tint_symbol_1.read(uint2(int2(0)), 1u); + int4 res = tint_symbol_1.read(uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm index 00b2ab57c4..72f452b4df 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4int = OpTypeVector %int 4 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f85291 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4int Function %26 + %res = OpVariable %_ptr_Function_v4int Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4int %19 %21 Lod %uint_1 + %17 = OpImageFetch %v4int %19 %22 Lod %uint_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_f85291 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_f85291 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_f85291 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_f85291 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_f85291 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_f85291 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl index 56f3c1ba55..7fcdc5b785 100644 --- a/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/f85291.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_f85291() { - var res : vec4 = textureLoad(arg_0, vec2(), 1u); + var res : vec4 = textureLoad(arg_0, vec2(1i), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl index b8e63aa7b9..8e6c0aceea 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: i32) -> f32 fn textureLoad_fcd23d() { - var res: f32 = textureLoad(arg_0, vec2(), 1i); + var res: f32 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl index 8ca9a66e15..c6847389c6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fcd23d() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl index 8ca9a66e15..c6847389c6 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fcd23d() { - float res = arg_0.Load(uint3(0u, 0u, uint(0)), 1).x; + float res = arg_0.Load(uint3((1u).xx, uint(0)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl index 87e28c8881..d812b0ddbc 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - float res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1).x; + float res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl index 159dd8d04d..db62b99268 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_fcd23d(depth2d_ms tint_symbol_1) { - float res = tint_symbol_1.read(uint2(uint2(0u)), 1); + float res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.spvasm index c504a4ec61..57fb66f9c0 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,41 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpTypeFunction %v4float + %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_fcd23d = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %21 Sample %int_1 + %17 = OpImageFetch %v4float %18 %22 Sample %int_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureLoad_fcd23d +%vertex_main_inner = OpFunction %v4float None %27 + %29 = OpLabel + %30 = OpFunctionCall %void %textureLoad_fcd23d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %32 = OpLabel + %33 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %33 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_fcd23d + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_fcd23d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %void %textureLoad_fcd23d + %39 = OpLabel + %40 = OpFunctionCall %void %textureLoad_fcd23d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl index 8c90ff74c1..bb55cae94d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fcd23d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_fcd23d() { - var res : f32 = textureLoad(arg_0, vec2(), 1i); + var res : f32 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl index a85f8c21ea..0d15c8594b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_fe0565() { - var res: vec4 = textureLoad(arg_0, vec2(), 1i); + var res: vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl index d4b06335fd..85598d6038 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fe0565() { - uint4 res = arg_0.Load((0u).xx, 1); + uint4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl index d4b06335fd..85598d6038 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fe0565() { - uint4 res = arg_0.Load((0u).xx, 1); + uint4 res = arg_0.Load((1u).xx, 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl index 5447511f61..a805a7752d 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(0u)), 1); + uvec4 res = texelFetch(arg_0_1, ivec2(uvec2(1u)), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl index 7e87a5c2a3..ab16eeba7f 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_fe0565(texture2d_ms tint_symbol_1) { - uint4 res = tint_symbol_1.read(uint2(uint2(0u)), 1); + uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm index 9a345fb351..4ba192b4cd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,40 +39,41 @@ %13 = OpTypeFunction %void %v4uint = OpTypeVector %uint 4 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_fe0565 = OpFunction %void None %13 %16 = OpLabel - %res = OpVariable %_ptr_Function_v4uint Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %27 %19 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4uint %19 %21 Sample %int_1 + %17 = OpImageFetch %v4uint %19 %22 Sample %int_1 OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureLoad_fe0565 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureLoad_fe0565 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_fe0565 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_fe0565 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_fe0565 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_fe0565 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl index 6aba3a6161..1fc5a55f98 100644 --- a/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/fe0565.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_fe0565() { - var res : vec4 = textureLoad(arg_0, vec2(), 1i); + var res : vec4 = textureLoad(arg_0, vec2(1u), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl index 4c5826b152..13bdf4049b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: u32) -> f32 fn textureLoad_ff1119() { - var res: f32 = textureLoad(arg_0, vec2(), 1i, 1u); + var res: f32 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl index 4b0e14e488..9563888323 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_ff1119() { - float res = arg_0.Load(int4(0, 0, 1, int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, 1), int(1u))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl index 4b0e14e488..9563888323 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_ff1119() { - float res = arg_0.Load(int4(0, 0, 1, int(1u))).x; + float res = arg_0.Load(int4(int3((1).xx, 1), int(1u))).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl index 3a05870595..7a186c92fd 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)).x; } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)).x; } void fragment_main() { @@ -38,7 +38,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - float res = texelFetch(arg_0_1, ivec3(0, 0, 1), int(1u)).x; + float res = texelFetch(arg_0_1, ivec3(ivec2(1), 1), int(1u)).x; } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl index f136a44a60..e8df23cfce 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_ff1119(depth2d_array tint_symbol_1) { - float res = tint_symbol_1.read(uint2(int2(0)), 1, 1u); + float res = tint_symbol_1.read(uint2(int2(1)), 1, 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.spvasm index faa06522b9..c95bc7e80b 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,42 +38,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpTypeFunction %v4float + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_ff1119 = OpFunction %void None %12 %15 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %18 = OpLoad %11 %arg_0 - %17 = OpImageFetch %v4float %18 %23 Lod %uint_1 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + %17 = OpImageFetch %v4float %18 %26 Lod %uint_1 %16 = OpCompositeExtract %float %17 0 OpStore %res %16 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureLoad_ff1119 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureLoad_ff1119 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureLoad_ff1119 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %40 = OpLabel %41 = OpFunctionCall %void %textureLoad_ff1119 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_ff1119 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl index de0e81a33f..54b519f32a 100644 --- a/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureLoad/ff1119.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_ff1119() { - var res : f32 = textureLoad(arg_0, vec2(), 1i, 1u); + var res : f32 = textureLoad(arg_0, vec2(1i), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl index 99f28fbe95..a85b019d5e 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> f32 fn textureSample_0dff6c() { - var res: f32 = textureSample(arg_0, arg_1, vec2(), vec2()); + var res: f32 = textureSample(arg_0, arg_1, vec2(1.f), vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl index 5e03f88519..b1bd4db5ac 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_0dff6c() { - float res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl index 5e03f88519..b1bd4db5ac 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_0dff6c() { - float res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl index f0907928f7..569c11d74a 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSample_0dff6c() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl index ea808aeebb..921da0e350 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_0dff6c(depth2d tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), int2(0)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), int2(1)); } fragment void fragment_main(depth2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm index e5558437d4..f904425611 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,27 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %23 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %28 = OpConstantNull %float %textureSample_0dff6c = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %28 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %13 = OpImageSampleImplicitLod %v4float %18 %20 ConstOffset %23 + %13 = OpImageSampleImplicitLod %v4float %18 %21 ConstOffset %25 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_0dff6c + %30 = OpLabel + %31 = OpFunctionCall %void %textureSample_0dff6c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl index 5dff612013..077f24e96f 100644 --- a/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/0dff6c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_0dff6c() { - var res : f32 = textureSample(arg_0, arg_1, vec2(), vec2()); + var res : f32 = textureSample(arg_0, arg_1, vec2(1.0f), vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl index 75d604c4e5..270ed3cfa1 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureSample_17e988() { - var res: vec4 = textureSample(arg_0, arg_1, vec2(), 1i, vec2()); + var res: vec4 = textureSample(arg_0, arg_1, vec2(1.f), 1i, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl index fc8a980c3c..0d08b8a044 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_17e988() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl index fc8a980c3c..0d08b8a044 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_17e988() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl index fdfe3c0022..e7e4671636 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_17e988() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl index 167ac7b683..a0488fff16 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_17e988(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm index 576ac755e6..577289cdb3 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,27 +28,31 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %25 = OpConstantNull %v2int + %29 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpConstantNull %v4float + %32 = OpConstantNull %v4float %textureSample_17e988 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %28 + %res = OpVariable %_ptr_Function_v4float Function %32 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 ConstOffset %25 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 ConstOffset %29 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSample_17e988 + %34 = OpLabel + %35 = OpFunctionCall %void %textureSample_17e988 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl index d65f73908b..4f408542c1 100644 --- a/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/17e988.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_17e988() { - var res : vec4 = textureSample(arg_0, arg_1, vec2(), 1i, vec2()); + var res : vec4 = textureSample(arg_0, arg_1, vec2(1.0f), 1i, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl index da6cdf5766..7e6f1669f0 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureSample_193203() { - var res: vec4 = textureSample(arg_0, arg_1, vec2(), 1u, vec2()); + var res: vec4 = textureSample(arg_0, arg_1, vec2(1.f), 1u, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl index 187167c12a..6c65bd9269 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_193203() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl index 187167c12a..6c65bd9269 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_193203() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl index ef540d858c..d937f89ec1 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_193203() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl index c558b322fa..94f0b0289a 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_193203(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm index 8804d99e13..23ed9ec987 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,28 +28,33 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %29 = OpConstantNull %v4float + %34 = OpConstantNull %v4float %textureSample_193203 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %29 + %res = OpVariable %_ptr_Function_v4float Function %34 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 ConstOffset %26 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 ConstOffset %31 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSample_193203 + %36 = OpLabel + %37 = OpFunctionCall %void %textureSample_193203 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl index 3413bbce1f..1338058ac5 100644 --- a/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/193203.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_193203() { - var res : vec4 = textureSample(arg_0, arg_1, vec2(), 1u, vec2()); + var res : vec4 = textureSample(arg_0, arg_1, vec2(1.0f), 1u, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl index 852f2bd688..ecd6c55c9e 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> f32 fn textureSample_1a4e1b() { - var res: f32 = textureSample(arg_0, arg_1, vec2(), 1u); + var res: f32 = textureSample(arg_0, arg_1, vec2(1.f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl index 4c9c23a2cb..48c3a12db6 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_1a4e1b() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl index 4c9c23a2cb..48c3a12db6 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_1a4e1b() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl index 492bbc0569..eb3bbf5b76 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSample_1a4e1b() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 0.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 0.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl index efc575cca8..f128704ca0 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_1a4e1b(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm index 2da95e8fef..bfb607ddfb 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,30 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %27 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_1a4e1b = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %27 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertUToF %float %uint_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertUToF %float %uint_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSample_1a4e1b + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_1a4e1b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl index 7bc414e02c..ddcf5c16dc 100644 --- a/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/1a4e1b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_1a4e1b() { - var res : f32 = textureSample(arg_0, arg_1, vec2(), 1u); + var res : f32 = textureSample(arg_0, arg_1, vec2(1.0f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl index ccab6e525e..28cf0ec02f 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_3d, sampler: sampler, coords: vec3, @const offset: vec3) -> vec4 fn textureSample_2149ec() { - var res: vec4 = textureSample(arg_0, arg_1, vec3(), vec3()); + var res: vec4 = textureSample(arg_0, arg_1, vec3(1.f), vec3(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl index 137a2ffde4..3d19892105 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_2149ec() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx, (0).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl index 137a2ffde4..3d19892105 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_2149ec() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx, (0).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl index 2592c4f486..f84b20c0e9 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSample_2149ec() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f), ivec3(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(1.0f), ivec3(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl index b6ec3094f7..8a65f3f3cc 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_2149ec(texture3d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), int3(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), int3(1)); } fragment void fragment_main(texture3d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm index 21ae9c0754..a239621c65 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,24 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %22 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSample_2149ec = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 ConstOffset %22 + %12 = OpImageSampleImplicitLod %v4float %17 %20 ConstOffset %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_2149ec + %29 = OpLabel + %30 = OpFunctionCall %void %textureSample_2149ec OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl index 0b47e89f5e..35374f74fa 100644 --- a/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/2149ec.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_2149ec() { - var res : vec4 = textureSample(arg_0, arg_1, vec3(), vec3()); + var res : vec4 = textureSample(arg_0, arg_1, vec3(1.0f), vec3(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl index 373481c866..051eaf52c8 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2) -> f32 fn textureSample_38bbb9() { - var res: f32 = textureSample(arg_0, arg_1, vec2()); + var res: f32 = textureSample(arg_0, arg_1, vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl index aeb2754c08..e03d4c2c37 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_38bbb9() { - float res = arg_0.Sample(arg_1, (0.0f).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl index aeb2754c08..e03d4c2c37 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_38bbb9() { - float res = arg_0.Sample(arg_1, (0.0f).xx).x; + float res = arg_0.Sample(arg_1, (1.0f).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl index b2554c9f06..416111a300 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSample_38bbb9() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 0.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl index 7884b3124b..cf5b10fb1f 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_38bbb9(depth2d tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f)); } fragment void fragment_main(depth2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm index 788cf86d47..dea5bc7287 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 27 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,22 +28,23 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float - %23 = OpConstantNull %float + %24 = OpConstantNull %float %textureSample_38bbb9 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %23 + %res = OpVariable %_ptr_Function_float Function %24 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %13 = OpImageSampleImplicitLod %v4float %18 %20 + %13 = OpImageSampleImplicitLod %v4float %18 %21 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %25 = OpLabel - %26 = OpFunctionCall %void %textureSample_38bbb9 + %26 = OpLabel + %27 = OpFunctionCall %void %textureSample_38bbb9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl index 6edb215124..5289739c71 100644 --- a/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/38bbb9.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_38bbb9() { - var res : f32 = textureSample(arg_0, arg_1, vec2()); + var res : f32 = textureSample(arg_0, arg_1, vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl index bbfc11655a..788c36cee9 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_3d, sampler: sampler, coords: vec3) -> vec4 fn textureSample_3b50bd() { - var res: vec4 = textureSample(arg_0, arg_1, vec3()); + var res: vec4 = textureSample(arg_0, arg_1, vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl index 7b99e2a794..e0704fc77d 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_3b50bd() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl index 7b99e2a794..e0704fc77d 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_3b50bd() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl index 8d1d18d519..dee9372743 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSample_3b50bd() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f)); + vec4 res = texture(arg_0_arg_1, vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl index a63d38d491..a468d128f3 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_3b50bd(texture3d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f)); } fragment void fragment_main(texture3d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm index c41cc4dcc8..688f51cffb 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 26 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,21 +28,22 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %22 = OpConstantNull %v4float + %23 = OpConstantNull %v4float %textureSample_3b50bd = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %22 + %res = OpVariable %_ptr_Function_v4float Function %23 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 + %12 = OpImageSampleImplicitLod %v4float %17 %20 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %24 = OpLabel - %25 = OpFunctionCall %void %textureSample_3b50bd + %25 = OpLabel + %26 = OpFunctionCall %void %textureSample_3b50bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl index 43bc582115..8c8a8811a3 100644 --- a/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/3b50bd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_3b50bd() { - var res : vec4 = textureSample(arg_0, arg_1, vec3()); + var res : vec4 = textureSample(arg_0, arg_1, vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl index 3e7b95dd1c..9ba4e8b990 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> f32 fn textureSample_4703d0() { - var res: f32 = textureSample(arg_0, arg_1, vec2(), 1u, vec2()); + var res: f32 = textureSample(arg_0, arg_1, vec2(1.f), 1u, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl index 6d8b7dd9ad..fc84a423ce 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4703d0() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl index 6d8b7dd9ad..fc84a423ce 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4703d0() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl index e412a9c060..4fb976b6b0 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_4703d0(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, int2(0)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm index 178481b953..e0a5ff88cc 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,29 +28,34 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %27 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %30 = OpConstantNull %float + %35 = OpConstantNull %float %textureSample_4703d0 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %30 + %res = OpVariable %_ptr_Function_float Function %35 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertUToF %float %uint_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 ConstOffset %27 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertUToF %float %uint_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 ConstOffset %32 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSample_4703d0 + %37 = OpLabel + %38 = OpFunctionCall %void %textureSample_4703d0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl index 0ee65984d7..26fc828460 100644 --- a/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4703d0.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_4703d0() { - var res : f32 = textureSample(arg_0, arg_1, vec2(), 1u, vec2()); + var res : f32 = textureSample(arg_0, arg_1, vec2(1.0f), 1u, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl index 2bb83794b8..a7caecb296 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureSample_4dd1bf() { - var res: vec4 = textureSample(arg_0, arg_1, vec3(), 1i); + var res: vec4 = textureSample(arg_0, arg_1, vec3(1.f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl index 47013d29e5..29b4291222 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4dd1bf() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl index 47013d29e5..29b4291222 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4dd1bf() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl index f392da9c96..c6fdd3ba87 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_4dd1bf(texturecube_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1); } fragment void fragment_main(texturecube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm index d67b63c005..5a240851ca 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,25 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_4dd1bf = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_4dd1bf + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_4dd1bf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl index cdeb313cfb..8c22933384 100644 --- a/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/4dd1bf.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_4dd1bf() { - var res : vec4 = textureSample(arg_0, arg_1, vec3(), 1i); + var res : vec4 = textureSample(arg_0, arg_1, vec3(1.0f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl index e3eed03fce..c8967902d3 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureSample_51b514() { - var res: vec4 = textureSample(arg_0, arg_1, vec2()); + var res: vec4 = textureSample(arg_0, arg_1, vec2(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl index 68aa5c7a80..f2a4363896 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_51b514() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl index 68aa5c7a80..f2a4363896 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_51b514() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl index b04d68133f..f342935e9b 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSample_51b514() { - vec4 res = texture(arg_0_arg_1, vec2(0.0f)); + vec4 res = texture(arg_0_arg_1, vec2(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl index a8e99fb996..fc21a11477 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_51b514(texture2d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f)); } fragment void fragment_main(texture2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm index a7f4db5ba1..c60d0d9ac7 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 26 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,21 +28,22 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %22 = OpConstantNull %v4float + %23 = OpConstantNull %v4float %textureSample_51b514 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %22 + %res = OpVariable %_ptr_Function_v4float Function %23 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 + %12 = OpImageSampleImplicitLod %v4float %17 %20 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %24 = OpLabel - %25 = OpFunctionCall %void %textureSample_51b514 + %25 = OpLabel + %26 = OpFunctionCall %void %textureSample_51b514 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl index 7a5e264075..f2c44d4849 100644 --- a/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/51b514.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_51b514() { - var res : vec4 = textureSample(arg_0, arg_1, vec2()); + var res : vec4 = textureSample(arg_0, arg_1, vec2(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl index b6c5824ef5..c7b364947e 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> f32 fn textureSample_60bf45() { - var res: f32 = textureSample(arg_0, arg_1, vec2(), 1i, vec2()); + var res: f32 = textureSample(arg_0, arg_1, vec2(1.f), 1i, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl index 0575d77871..cd9ed54de8 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_60bf45() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl index 0575d77871..cd9ed54de8 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_60bf45() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl index 20593cef53..a1c4154b2f 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_60bf45(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, int2(0)); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm index 966d12da82..07330a4f82 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,28 +28,32 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpConstantNull %float + %33 = OpConstantNull %float %textureSample_60bf45 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %29 + %res = OpVariable %_ptr_Function_float Function %33 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertSToF %float %int_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 ConstOffset %26 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertSToF %float %int_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 ConstOffset %30 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSample_60bf45 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSample_60bf45 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl index 1f8b519155..1ad211e1b5 100644 --- a/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/60bf45.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_60bf45() { - var res : f32 = textureSample(arg_0, arg_1, vec2(), 1i, vec2()); + var res : f32 = textureSample(arg_0, arg_1, vec2(1.0f), 1i, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl index a4919effe6..d0f47d7456 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureSample_6717ca() { - var res: vec4 = textureSample(arg_0, arg_1, vec2(), 1i); + var res: vec4 = textureSample(arg_0, arg_1, vec2(1.f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl index 7b1e6e4161..7bb846533a 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_6717ca() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl index 7b1e6e4161..7bb846533a 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_6717ca() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl index 2698d8dc64..2a02847408 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_6717ca() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1))); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl index aa18356a8e..4d43b996d0 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_6717ca(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm index 9a6f9698ed..791030fda5 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_6717ca = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_6717ca + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_6717ca OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl index 76ba9f745e..294089ddf3 100644 --- a/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/6717ca.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_6717ca() { - var res : vec4 = textureSample(arg_0, arg_1, vec2(), 1i); + var res : vec4 = textureSample(arg_0, arg_1, vec2(1.0f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl index f774b5e76a..e59e22db8c 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> f32 fn textureSample_7e9ffd() { - var res: f32 = textureSample(arg_0, arg_1, vec2(), 1i); + var res: f32 = textureSample(arg_0, arg_1, vec2(1.f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl index b3167130ed..ca968eb1a3 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7e9ffd() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl index b3167130ed..ca968eb1a3 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7e9ffd() { - float res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl index 08b4dee837..71f476b8ca 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSample_7e9ffd() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 0.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 0.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl index 7ed4a39b83..0c46324bcd 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_7e9ffd(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1); + float res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm index 313d27def4..78b248405b 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,30 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %27 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_7e9ffd = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %27 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %21 = OpConvertSToF %float %int_1 - %24 = OpCompositeConstruct %v3float %float_0 %float_0 %21 - %13 = OpImageSampleImplicitLod %v4float %18 %24 + %23 = OpCompositeExtract %float %22 0 + %24 = OpCompositeExtract %float %22 1 + %25 = OpConvertSToF %float %int_1 + %28 = OpCompositeConstruct %v3float %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSample_7e9ffd + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_7e9ffd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl index 1332fda9ef..7b6b971567 100644 --- a/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7e9ffd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_7e9ffd() { - var res : f32 = textureSample(arg_0, arg_1, vec2(), 1i); + var res : f32 = textureSample(arg_0, arg_1, vec2(1.0f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl index f9375b6a20..e6e7dacf28 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> f32 fn textureSample_7fd8cb() { - var res: f32 = textureSample(arg_0, arg_1, vec3(), 1u); + var res: f32 = textureSample(arg_0, arg_1, vec3(1.f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl index b5845ec4d9..72ac331612 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7fd8cb() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl index b5845ec4d9..72ac331612 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7fd8cb() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl index d3e7dae9ee..b4a85988cc 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_7fd8cb(depthcube_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u); + float res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1u); } fragment void fragment_main(depthcube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm index bf1bc8b48a..dd124025de 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,31 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_7fd8cb = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %20 - %13 = OpImageSampleImplicitLod %v4float %18 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpCompositeExtract %float %21 2 + %25 = OpConvertUToF %float %uint_1 + %28 = OpCompositeConstruct %v4float %22 %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_7fd8cb + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_7fd8cb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl index 113fb82916..efb9aa88ab 100644 --- a/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/7fd8cb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_7fd8cb() { - var res : f32 = textureSample(arg_0, arg_1, vec3(), 1u); + var res : f32 = textureSample(arg_0, arg_1, vec3(1.0f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl index da9893ca71..62b34f6065 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureSample_85c4ba() { - var res: vec4 = textureSample(arg_0, arg_1, vec2(), vec2()); + var res: vec4 = textureSample(arg_0, arg_1, vec2(1.f), vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl index f43541cd7f..7805be03fc 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_85c4ba() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl index f43541cd7f..7805be03fc 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_85c4ba() { - float4 res = arg_0.Sample(arg_1, (0.0f).xx, (0).xx); + float4 res = arg_0.Sample(arg_1, (1.0f).xx, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl index 9c7c7b3e46..d2c3fdf6ff 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSample_85c4ba() { - vec4 res = textureOffset(arg_0_arg_1, vec2(0.0f), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec2(1.0f), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl index 50844e38bc..8166410d20 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_85c4ba(texture2d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), int2(1)); } fragment void fragment_main(texture2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm index 17a25fce30..c10c7969b0 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,24 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSample_85c4ba = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 ConstOffset %22 + %12 = OpImageSampleImplicitLod %v4float %17 %20 ConstOffset %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_85c4ba + %29 = OpLabel + %30 = OpFunctionCall %void %textureSample_85c4ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl index 8d23c1512f..aadd3ada1f 100644 --- a/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/85c4ba.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_85c4ba() { - var res : vec4 = textureSample(arg_0, arg_1, vec2(), vec2()); + var res : vec4 = textureSample(arg_0, arg_1, vec2(1.0f), vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl index b1003d5ca1..44f9a7f393 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureSample_bc7477() { - var res: vec4 = textureSample(arg_0, arg_1, vec3(), 1u); + var res: vec4 = textureSample(arg_0, arg_1, vec3(1.f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl index 9a8aa64548..77241f8610 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_bc7477() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl index 9a8aa64548..77241f8610 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_bc7477() { - float4 res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1u))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl index e106ef05a1..8391338abe 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_bc7477(texturecube_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1u); } fragment void fragment_main(texturecube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm index 5c437e07b5..f4bea58c85 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,25 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_bc7477 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_bc7477 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_bc7477 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl index ed1eaf5106..9dcbcfa4a1 100644 --- a/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/bc7477.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_bc7477() { - var res : vec4 = textureSample(arg_0, arg_1, vec3(), 1u); + var res : vec4 = textureSample(arg_0, arg_1, vec3(1.0f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl index 94a4b8cbf6..f694b6db05 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> f32 fn textureSample_c2f4e8() { - var res: f32 = textureSample(arg_0, arg_1, vec3(), 1i); + var res: f32 = textureSample(arg_0, arg_1, vec3(1.f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl index c2eee5aed8..26b5e6fd5e 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_c2f4e8() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl index c2eee5aed8..26b5e6fd5e 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_c2f4e8() { - float res = arg_0.Sample(arg_1, float4(0.0f, 0.0f, 0.0f, float(1))).x; + float res = arg_0.Sample(arg_1, float4((1.0f).xxx, float(1))).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl index 812a3e0a2c..27a85f22af 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_c2f4e8(depthcube_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1); + float res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1); } fragment void fragment_main(depthcube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm index 8c5f546722..fde221364b 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,31 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %31 = OpConstantNull %float %textureSample_c2f4e8 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %31 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %20 - %13 = OpImageSampleImplicitLod %v4float %18 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpCompositeExtract %float %21 2 + %25 = OpConvertSToF %float %int_1 + %28 = OpCompositeConstruct %v4float %22 %23 %24 %25 + %13 = OpImageSampleImplicitLod %v4float %18 %28 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_c2f4e8 + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_c2f4e8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl index 30b80497b0..9d26633bb6 100644 --- a/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/c2f4e8.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_c2f4e8() { - var res : f32 = textureSample(arg_0, arg_1, vec3(), 1i); + var res : f32 = textureSample(arg_0, arg_1, vec3(1.0f), 1i); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl index a73972e287..7aeff75b00 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureSample_d6b281() { - var res: vec4 = textureSample(arg_0, arg_1, vec2(), 1u); + var res: vec4 = textureSample(arg_0, arg_1, vec2(1.f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl index aea011782f..969ed3d395 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_d6b281() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl index aea011782f..969ed3d395 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_d6b281() { - float4 res = arg_0.Sample(arg_1, float3(0.0f, 0.0f, float(1u))); + float4 res = arg_0.Sample(arg_1, float3((1.0f).xx, float(1u))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl index b375b29120..e2d3e5738d 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_d6b281() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u))); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1u))); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl index 0819cfe55c..8f6e17e15e 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_d6b281(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm index f8028706fb..89da2493aa 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSample_d6b281 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_d6b281 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSample_d6b281 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl index 63495a9ad4..351d73eafc 100644 --- a/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/d6b281.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_d6b281() { - var res : vec4 = textureSample(arg_0, arg_1, vec2(), 1u); + var res : vec4 = textureSample(arg_0, arg_1, vec2(1.0f), 1u); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl index 35b2e9ea41..e0e2213437 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureSample_e53267() { - var res: vec4 = textureSample(arg_0, arg_1, vec3()); + var res: vec4 = textureSample(arg_0, arg_1, vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl index 18cffd4082..7c72e8aabe 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_e53267() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl index 18cffd4082..7c72e8aabe 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_e53267() { - float4 res = arg_0.Sample(arg_1, (0.0f).xxx); + float4 res = arg_0.Sample(arg_1, (1.0f).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl index 8abd834d27..bab283453b 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSample_e53267() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f)); + vec4 res = texture(arg_0_arg_1, vec3(1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl index 6953ad27ee..273271f5cc 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_e53267(texturecube tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f)); } fragment void fragment_main(texturecube tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm index 814f3b677c..faaae35528 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 26 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,21 +28,22 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %22 = OpConstantNull %v4float + %23 = OpConstantNull %v4float %textureSample_e53267 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %22 + %res = OpVariable %_ptr_Function_v4float Function %23 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 + %12 = OpImageSampleImplicitLod %v4float %17 %20 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %24 = OpLabel - %25 = OpFunctionCall %void %textureSample_e53267 + %25 = OpLabel + %26 = OpFunctionCall %void %textureSample_e53267 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl index d4d1c1097d..4ed3277eab 100644 --- a/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/e53267.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_e53267() { - var res : vec4 = textureSample(arg_0, arg_1, vec3()); + var res : vec4 = textureSample(arg_0, arg_1, vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl index d35b7a44be..9187195e0b 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3) -> f32 fn textureSample_ea7030() { - var res: f32 = textureSample(arg_0, arg_1, vec3()); + var res: f32 = textureSample(arg_0, arg_1, vec3(1.f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl index 4f82f08ede..efcac937ab 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_ea7030() { - float res = arg_0.Sample(arg_1, (0.0f).xxx).x; + float res = arg_0.Sample(arg_1, (1.0f).xxx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl index 4f82f08ede..efcac937ab 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_ea7030() { - float res = arg_0.Sample(arg_1, (0.0f).xxx).x; + float res = arg_0.Sample(arg_1, (1.0f).xxx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl index 38032804a5..8fbca7bee0 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureSample_ea7030() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 0.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 0.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl index 295b3acf19..c5cfd80bd0 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_ea7030(depthcube tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample(tint_symbol_1, float3(0.0f)); + float res = tint_symbol.sample(tint_symbol_1, float3(1.0f)); } fragment void fragment_main(depthcube tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm index d3c3a4ea9c..03c157af36 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 27 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,22 +28,23 @@ %v4float = OpTypeVector %float 4 %17 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float - %23 = OpConstantNull %float + %24 = OpConstantNull %float %textureSample_ea7030 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %23 + %res = OpVariable %_ptr_Function_float Function %24 %15 = OpLoad %7 %arg_1 %16 = OpLoad %3 %arg_0 %18 = OpSampledImage %17 %16 %15 - %13 = OpImageSampleImplicitLod %v4float %18 %20 + %13 = OpImageSampleImplicitLod %v4float %18 %21 %12 = OpCompositeExtract %float %13 0 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %25 = OpLabel - %26 = OpFunctionCall %void %textureSample_ea7030 + %26 = OpLabel + %27 = OpFunctionCall %void %textureSample_ea7030 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl index de2934ba44..5d10efeb20 100644 --- a/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSample/ea7030.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_ea7030() { - var res : f32 = textureSample(arg_0, arg_1, vec3()); + var res : f32 = textureSample(arg_0, arg_1, vec3(1.0f)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl index 55110ea54b..080a6bebbe 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2) -> vec4 fn textureSampleBaseClampToEdge_7c04e6() { - var res: vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl index 2dbd2e8803..6bfa0cb17c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl @@ -91,7 +91,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleBaseClampToEdge_7c04e6() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl index 2dbd2e8803..6bfa0cb17c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl @@ -91,7 +91,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleBaseClampToEdge_7c04e6() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl index 8bc33dfd06..82b6a828ab 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl @@ -58,7 +58,7 @@ uniform highp sampler2D ext_tex_plane_1_1; uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } vec4 vertex_main() { @@ -135,7 +135,7 @@ uniform highp sampler2D ext_tex_plane_1_1; uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void fragment_main() { @@ -206,7 +206,7 @@ uniform highp sampler2D ext_tex_plane_1_1; uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl index 70af2f8058..146503a4f1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl @@ -64,7 +64,7 @@ float4 textureSampleExternal(texture2d plane0, texture2d< } void textureSampleBaseClampToEdge_7c04e6(texture2d tint_symbol_1, texture2d tint_symbol_2, sampler tint_symbol_3, const constant ExternalTextureParams* const tint_symbol_4) { - float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(0.0f), *(tint_symbol_4)); + float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(1.0f), *(tint_symbol_4)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm index 9490a32897..1597eb38f7 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 164 +; Bound: 165 ; Schema: 0 OpCapability Shader OpCapability ImageQuery @@ -127,10 +127,11 @@ %119 = OpConstantNull %uint %void = OpTypeVoid %137 = OpTypeFunction %void + %145 = OpConstantComposite %v2float %float_1 %float_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %151 = OpTypeFunction %v4float + %152 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %25 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -246,31 +247,31 @@ %142 = OpLoad %11 %arg_0 %143 = OpLoad %11 %ext_tex_plane_1 %144 = OpLoad %24 %arg_1 - %147 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %148 = OpLoad %ExternalTextureParams %147 - %141 = OpFunctionCall %v4float %textureSampleExternal %142 %143 %144 %87 %148 + %148 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %149 = OpLoad %ExternalTextureParams %148 + %141 = OpFunctionCall %v4float %textureSampleExternal %142 %143 %144 %145 %149 OpStore %res %141 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %151 - %153 = OpLabel - %154 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 +%vertex_main_inner = OpFunction %v4float None %152 + %154 = OpLabel + %155 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %137 - %156 = OpLabel - %157 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %157 + %157 = OpLabel + %158 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %158 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %137 - %159 = OpLabel - %160 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 + %160 = OpLabel + %161 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %137 - %162 = OpLabel - %163 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 + %163 = OpLabel + %164 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl index f24b223725..dcebcd2041 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBaseClampToEdge_7c04e6() { - var res : vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2()); + var res : vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl index 2952fdc3d7..e5e598cd43 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBaseClampToEdge(texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureSampleBaseClampToEdge_9ca02c() { - var res: vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl index 27991572a6..c868b5ec43 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl @@ -11,7 +11,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBaseClampToEdge_9ca02c() { - float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (0.0f).xx); + float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl index 27991572a6..c868b5ec43 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl @@ -11,7 +11,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBaseClampToEdge_9ca02c() { - float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (0.0f).xx); + float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl index baa94b2630..2d912aaa65 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl @@ -11,7 +11,7 @@ vec4 tint_textureSampleBaseClampToEdge(highp sampler2D t_1, highp sampler2D t_s, uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(0.0f)); + vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(1.0f)); } vec4 vertex_main() { @@ -41,7 +41,7 @@ vec4 tint_textureSampleBaseClampToEdge(highp sampler2D t_1, highp sampler2D t_s, uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(0.0f)); + vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(1.0f)); } void fragment_main() { @@ -65,7 +65,7 @@ vec4 tint_textureSampleBaseClampToEdge(highp sampler2D t_1, highp sampler2D t_s, uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(0.0f)); + vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl index 221a88d558..f1d03f2037 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl @@ -9,7 +9,7 @@ float4 tint_textureSampleBaseClampToEdge(texture2d t, sam } void textureSampleBaseClampToEdge_9ca02c(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_textureSampleBaseClampToEdge(tint_symbol_1, tint_symbol_2, float2(0.0f)); + float4 res = tint_textureSampleBaseClampToEdge(tint_symbol_1, tint_symbol_2, float2(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm index 154fae2eee..cb680b0b87 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 64 +; Bound: 65 ; Schema: 0 OpCapability Shader OpCapability ImageQuery @@ -60,8 +60,9 @@ %40 = OpTypeSampledImage %11 %void = OpTypeVoid %42 = OpTypeFunction %void + %49 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %51 = OpTypeFunction %v4float + %52 = OpTypeFunction %v4float %tint_textureSampleBaseClampToEdge = OpFunction %v4float None %15 %t = OpFunctionParameter %11 %s = OpFunctionParameter %14 @@ -83,29 +84,29 @@ %res = OpVariable %_ptr_Function_v4float Function %5 %47 = OpLoad %11 %arg_0 %48 = OpLoad %14 %arg_1 - %46 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %47 %48 %37 + %46 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %47 %48 %49 OpStore %res %46 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %51 - %53 = OpLabel - %54 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %42 - %56 = OpLabel - %57 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %57 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %42 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %42 - %62 = OpLabel - %63 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl index 4d1b105194..9ec6ff613a 100644 --- a/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBaseClampToEdge_9ca02c() { - var res : vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2()); + var res : vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl index f76a6b2fd2..1272f7fcec 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, bias: f32) -> vec4 fn textureSampleBias_1c707e() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1u, 1.f); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(1.f), 1u, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl index f0c0f284e8..07f63252a1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_1c707e() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl index f0c0f284e8..07f63252a1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_1c707e() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl index 6463438c11..84e14fe4dd 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_1c707e() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl index 606c7f3a66..39249ba159 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_1c707e(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, bias(1.0f)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm index c809e51c35..fea1a4d1f8 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_1c707e = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %27 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias %float_1 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSampleBias_1c707e + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_1c707e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl index a738d9c986..b8d2d75378 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/1c707e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_1c707e() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1u, 1.0f); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(1.0f), 1u, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl index 53001713f9..8c734dbc51 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_53b9f7() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.f); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(1.f), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl index ec467db1b2..4c8919fa5a 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_53b9f7() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl index ec467db1b2..4c8919fa5a 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_53b9f7() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl index c40abb62e7..ee550b4f18 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSampleBias_53b9f7() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl index dde5bfe38d..294cda109a 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_53b9f7(texturecube tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), bias(1.0f)); } fragment void fragment_main(texturecube tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm index ff353231f9..e36e9216a5 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.spvasm @@ -28,8 +28,8 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %23 = OpConstantNull %v4float %textureSampleBias_53b9f7 = OpFunction %void None %8 @@ -38,7 +38,7 @@ %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias %float_1 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl index d4680e6c98..6add8f8c98 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/53b9f7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_53b9f7() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0f); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(1.0f), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl index 32eafc4bed..c78555e222 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32, @const offset: vec3) -> vec4 fn textureSampleBias_594824() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.f, vec3()); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(1.f), 1.f, vec3(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl index 8ebc0016bd..0ca62fce97 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_594824() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl index 8ebc0016bd..0ca62fce97 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_594824() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl index e524a8d191..a13ea6337c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleBias_594824() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f), ivec3(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec3(1.0f), ivec3(1), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl index 193009e0a6..a7214cbfdd 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_594824(texture3d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), bias(1.0f), int3(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), bias(1.0f), int3(1)); } fragment void fragment_main(texture3d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.spvasm index 4cc39b2a05..700df82e68 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %23 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSampleBias_594824 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias|ConstOffset %float_1 %23 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias|ConstOffset %float_1 %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_594824 + %29 = OpLabel + %30 = OpFunctionCall %void %textureSampleBias_594824 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl index 3fe9740768..6a60558e3d 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/594824.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_594824() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0f, vec3()); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(1.0f), 1.0f, vec3(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl index b47bcdf15f..bba474edb5 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32) -> vec4 fn textureSampleBias_6a9113() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.f); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(1.f), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl index a3e3379d3d..4949956d33 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_6a9113() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl index a3e3379d3d..4949956d33 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_6a9113() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl index ca84e9dad8..7190a88487 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleBias_6a9113() { - vec4 res = texture(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = texture(arg_0_arg_1, vec2(1.0f), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl index ac41f09b68..c3b8284eb0 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_6a9113(texture2d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), bias(1.0f)); } fragment void fragment_main(texture2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm index eb73824e72..44afc2ef41 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.spvasm @@ -28,8 +28,8 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %23 = OpConstantNull %v4float %textureSampleBias_6a9113 = OpFunction %void None %8 @@ -38,7 +38,7 @@ %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias %float_1 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl index f864438f46..7145dea0ee 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/6a9113.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_6a9113() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0f); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(1.0f), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl index 20389f5365..e7aae062cf 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_80e579() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1i, 1.f); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(1.f), 1i, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl index 5e8a9d2d5d..acd8d6c9a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_80e579() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl index 5e8a9d2d5d..acd8d6c9a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_80e579() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl index 0b9130c29c..27da1a2bc0 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_80e579() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl index 0a6cba8e3b..075eb4f248 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_80e579(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, bias(1.0f)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm index 9907f75cda..0e5ab6c93d 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 34 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,26 +28,29 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_80e579 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %27 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias %float_1 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSampleBias_80e579 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_80e579 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl index 2d96438aa1..0bb682095c 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/80e579.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_80e579() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1i, 1.0f); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(1.0f), 1i, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl index dc6ef1ea6b..9c0fac2373 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_87915c() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1u, 1.f, vec2()); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(1.f), 1u, 1.f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl index d6e02c45f4..2f3e802318 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_87915c() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl index d6e02c45f4..2f3e802318 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_87915c() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl index 27f3db1da6..a9d8bb75a1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_87915c() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), ivec2(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), ivec2(1), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl index 0d11b74f63..ce4bb4ebb9 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_87915c(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1u, bias(1.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1u, bias(1.0f), int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm index fc3f131054..aa716b8249 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,29 +28,33 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %27 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpConstantNull %v4float + %34 = OpConstantNull %v4float %textureSampleBias_87915c = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %30 + %res = OpVariable %_ptr_Function_v4float Function %34 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertUToF %float %uint_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias|ConstOffset %float_1 %27 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias|ConstOffset %float_1 %31 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSampleBias_87915c + %36 = OpLabel + %37 = OpFunctionCall %void %textureSampleBias_87915c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl index ff707a3c37..d8a4075c60 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/87915c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_87915c() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1u, 1.0f, vec2()); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(1.0f), 1u, 1.0f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl index 45cb35fb03..f238a264e8 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_9dbb51() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1i, 1.f, vec2()); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(1.f), 1i, 1.f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl index bc8a5cd3d6..19f1088afe 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_9dbb51() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl index bc8a5cd3d6..19f1088afe 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_9dbb51() { - float4 res = arg_0.SampleBias(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl index 9f316abb23..e66d2542c1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_9dbb51() { - vec4 res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), ivec2(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), ivec2(1), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl index 9958fb10b2..0ef2fee0f9 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_9dbb51(texture2d_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), 1, bias(1.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), 1, bias(1.0f), int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm index f7bcac5432..eb7f586160 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,28 +28,31 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %29 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %29 = OpConstantNull %v4float + %32 = OpConstantNull %v4float %textureSampleBias_9dbb51 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %29 + %res = OpVariable %_ptr_Function_v4float Function %32 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %20 = OpConvertSToF %float %int_1 - %23 = OpCompositeConstruct %v3float %float_0 %float_0 %20 - %12 = OpImageSampleImplicitLod %v4float %17 %23 Bias|ConstOffset %float_1 %26 + %22 = OpCompositeExtract %float %21 0 + %23 = OpCompositeExtract %float %21 1 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v3float %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias|ConstOffset %float_1 %29 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSampleBias_9dbb51 + %34 = OpLabel + %35 = OpFunctionCall %void %textureSampleBias_9dbb51 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl index 24794c9d4f..7107527fc1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/9dbb51.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_9dbb51() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1i, 1.0f, vec2()); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(1.0f), 1i, 1.0f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl index e23688927e..53df7a04e9 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_a161cf() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.f, vec2()); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec2(1.f), 1.f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl index 3d63e8ac7f..4945bcf5a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_a161cf() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl index 3d63e8ac7f..4945bcf5a3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_a161cf() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl index e819fcd78c..d87948b0c8 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleBias_a161cf() { - vec4 res = textureOffset(arg_0_arg_1, vec2(0.0f), ivec2(0), 1.0f); + vec4 res = textureOffset(arg_0_arg_1, vec2(1.0f), ivec2(1), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl index 87dac440f0..c19ac1d389 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_a161cf(texture2d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float2(0.0f), bias(1.0f), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, float2(1.0f), bias(1.0f), int2(1)); } fragment void fragment_main(texture2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.spvasm index 6b14f26539..9ef90ee8a8 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,25 +28,26 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %19 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %23 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSampleBias_a161cf = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %27 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias|ConstOffset %float_1 %23 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias|ConstOffset %float_1 %24 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_a161cf + %29 = OpLabel + %30 = OpFunctionCall %void %textureSampleBias_a161cf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl index a9dd4dd2a3..5e297e05c1 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/a161cf.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_a161cf() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(), 1.0f, vec2()); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec2(1.0f), 1.0f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl index 2104892e8a..76bd6e3690 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32, bias: f32) -> vec4 fn textureSampleBias_c6953d() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1u, 1.f); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(1.f), 1u, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl index ed2fe6032f..5910685f30 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_c6953d() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl index ed2fe6032f..5910685f30 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_c6953d() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl index a116ed6995..1b2d13163a 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_c6953d(texturecube_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1u, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1u, bias(1.0f)); } fragment void fragment_main(texturecube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm index 9e266d7d99..a397331b08 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_c6953d = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 Bias %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_c6953d + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_c6953d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl index 3309656d63..05036e88a7 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/c6953d.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_c6953d() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1u, 1.0f); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(1.0f), 1u, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl index 9fc28004e3..69b7a6cd9f 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_d3fa1b() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.f); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(1.f), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl index cfb6394b5f..4a3c173be5 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_d3fa1b() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl index cfb6394b5f..4a3c173be5 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_d3fa1b() { - float4 res = arg_0.SampleBias(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl index ae1ce59630..00705775d9 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleBias_d3fa1b() { - vec4 res = texture(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = texture(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl index 07cd37c50e..abb22664be 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_d3fa1b(texture3d tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), bias(1.0f)); } fragment void fragment_main(texture3d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm index 563bd6364e..f784b802b6 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.spvasm @@ -28,8 +28,8 @@ %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %19 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %23 = OpConstantNull %v4float %textureSampleBias_d3fa1b = OpFunction %void None %8 @@ -38,7 +38,7 @@ %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %12 = OpImageSampleImplicitLod %v4float %17 %19 Bias %float_1 + %12 = OpImageSampleImplicitLod %v4float %17 %20 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl index 88a08857cd..4b2a5ef6d7 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/d3fa1b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_d3fa1b() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1.0f); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(1.0f), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl index 59b84919c9..8ce34f3547 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_eed7c4() { - var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1i, 1.f); + var res: vec4 = textureSampleBias(arg_0, arg_1, vec3(1.f), 1i, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl index c9c75d992e..c7a3c0e8af 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_eed7c4() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl index c9c75d992e..c7a3c0e8af 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_eed7c4() { - float4 res = arg_0.SampleBias(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl index de4a66326a..f85bedbbd0 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_eed7c4(texturecube_array tint_symbol, sampler tint_symbol_1) { - float4 res = tint_symbol.sample(tint_symbol_1, float3(0.0f), 1, bias(1.0f)); + float4 res = tint_symbol.sample(tint_symbol_1, float3(1.0f), 1, bias(1.0f)); } fragment void fragment_main(texturecube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm index ade6cb951d..dd2157d5c3 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %v4float = OpTypeVector %float 4 %16 = OpTypeSampledImage %3 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %26 = OpConstantNull %v4float + %30 = OpConstantNull %v4float %textureSampleBias_eed7c4 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_v4float Function %26 + %res = OpVariable %_ptr_Function_v4float Function %30 %14 = OpLoad %7 %arg_1 %15 = OpLoad %3 %arg_0 %17 = OpSampledImage %16 %15 %14 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleImplicitLod %v4float %17 %22 Bias %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleImplicitLod %v4float %17 %27 Bias %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleBias_eed7c4 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleBias_eed7c4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl index f1f2c2e1f3..7a4b8522b6 100644 --- a/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleBias/eed7c4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_eed7c4() { - var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(), 1i, 1.0f); + var res : vec4 = textureSampleBias(arg_0, arg_1, vec3(1.0f), 1i, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl index 5bf28c5290..7fdb1a295f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompare_1912e5() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1u, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(1.f), 1u, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl index 1547bd9e5c..7a92361bdb 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_1912e5() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl index 1547bd9e5c..7a92361bdb 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_1912e5() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl index 13fdf12a68..081841e72f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_1912e5(depthcube_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1u, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float3(1.0f), 1u, 1.0f); } fragment void fragment_main(depthcube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm index c678e74433..c25195f878 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v4float = OpTypeVector %float 4 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %30 = OpConstantNull %float %textureSampleCompare_1912e5 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %30 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertUToF %float %uint_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleDrefImplicitLod %float %16 %27 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_1912e5 + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleCompare_1912e5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl index 8f16f24429..fe9203256d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/1912e5.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_1912e5() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1u, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(1.0f), 1u, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl index 891c420699..164f50180a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompare_3a5923() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(1.f), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl index 948b7a7afd..0b84d355c7 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_3a5923() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl index 948b7a7afd..0b84d355c7 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_3a5923() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl index 7210133f16..572b81d306 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompare_3a5923() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl index 6b5e76d826..c2f18a0faa 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_3a5923(depth2d tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1.0f); } fragment void fragment_main(depth2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm index a3d051967c..3e1d3fc42d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.spvasm @@ -27,8 +27,8 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %18 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float %22 = OpConstantNull %float %textureSampleCompare_3a5923 = OpFunction %void None %8 @@ -37,7 +37,7 @@ %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1 + %12 = OpImageSampleDrefImplicitLod %float %16 %19 %float_1 OpStore %res %12 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl index 58dbd58481..f25220ec7d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/3a5923.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_3a5923() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(1.0f), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl index c73015c9f7..8f8b48fbdf 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompare_63fb83() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(1.f), 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl index 33b00bcdcc..1b2f46c934 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_63fb83() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl index 33b00bcdcc..1b2f46c934 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_63fb83() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmp(arg_1, (1.0f).xxx, 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl index 43a8eaac37..c44279d626 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompare_63fb83() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl index bdcf85c11b..675ddff6f3 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_63fb83(depthcube tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float3(1.0f), 1.0f); } fragment void fragment_main(depthcube tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm index 3f2a1bf3dc..a787c1e2fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.spvasm @@ -27,8 +27,8 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %18 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_float = OpTypePointer Function %float %22 = OpConstantNull %float %textureSampleCompare_63fb83 = OpFunction %void None %8 @@ -37,7 +37,7 @@ %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1 + %12 = OpImageSampleDrefImplicitLod %float %16 %19 %float_1 OpStore %res %12 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl index 0012b5fa4c..23417db597 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/63fb83.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_63fb83() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(1.0f), 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl index 58da02781c..63d0902e91 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_7b5025() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1u, 1.f, vec2()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(1.f), 1u, 1.f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl index fa4f65a556..c30bf79eb5 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_7b5025() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl index fa4f65a556..c30bf79eb5 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_7b5025() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl index eb74d3882e..b382b24db8 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_7b5025(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1u, 1.0f, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm index 5baaf3cc6b..7e77764050 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,29 +27,33 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpConstantNull %float + %33 = OpConstantNull %float %textureSampleCompare_7b5025 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %29 + %res = OpVariable %_ptr_Function_float Function %33 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 ConstOffset %26 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertUToF %float %uint_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 ConstOffset %30 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSampleCompare_7b5025 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleCompare_7b5025 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl index 602982c995..c2ed13272d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/7b5025.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_7b5025() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1u, 1.0f, vec2()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(1.0f), 1u, 1.0f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl index 7483dd56c3..0a099748bb 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompare_90ae56() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1u, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(1.f), 1u, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl index 7e358fb549..25b14da492 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_90ae56() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl index 7e358fb549..25b14da492 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_90ae56() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl index abfc412831..3b40ea3449 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompare_90ae56() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl index 00080f4f33..2722e0f12c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_90ae56(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1u, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1u, 1.0f); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm index 89b9887260..ddc33917f1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 33 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,26 +27,29 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %29 = OpConstantNull %float %textureSampleCompare_90ae56 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %29 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertUToF %float %uint_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertUToF %float %uint_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_90ae56 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleCompare_90ae56 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl index 8559700bfe..47b307abc1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/90ae56.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_90ae56() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1u, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(1.0f), 1u, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl index 68d1f2fb92..aabaf7a569 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_a3ca7e() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1i, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec3(1.f), 1i, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl index 0eaad4f49f..065ae8e209 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_a3ca7e() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl index 0eaad4f49f..065ae8e209 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_a3ca7e() { - float res = arg_0.SampleCmp(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl index 46e23e1e87..45b7d6d291 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_a3ca7e(depthcube_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float3(0.0f), 1, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float3(1.0f), 1, 1.0f); } fragment void fragment_main(depthcube_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm index e1df692756..d61275f5b1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 34 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -28,26 +28,30 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v4float = OpTypeVector %float 4 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %30 = OpConstantNull %float %textureSampleCompare_a3ca7e = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %30 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpCompositeExtract %float %20 2 + %24 = OpConvertSToF %float %int_1 + %27 = OpCompositeConstruct %v4float %21 %22 %23 %24 + %12 = OpImageSampleDrefImplicitLod %float %16 %27 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_a3ca7e + %32 = OpLabel + %33 = OpFunctionCall %void %textureSampleCompare_a3ca7e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl index 1c935d2d94..58499f5c53 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/a3ca7e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_a3ca7e() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(), 1i, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec3(1.0f), 1i, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl index 329e2f92ed..3edb3b03be 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_af1051() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1i, 1.f, vec2()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(1.f), 1i, 1.f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl index 60ff0955b9..40bf84af8b 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_af1051() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl index 60ff0955b9..40bf84af8b 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_af1051() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl index beb211766d..d1a90963ce 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_af1051(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1, 1.0f, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1, 1.0f, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm index 4e66ca9c71..168e2194a1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,28 +27,31 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %25 = OpConstantNull %v2int + %28 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %28 = OpConstantNull %float + %31 = OpConstantNull %float %textureSampleCompare_af1051 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %28 + %res = OpVariable %_ptr_Function_float Function %31 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 ConstOffset %25 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertSToF %float %int_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 ConstOffset %28 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleCompare_af1051 + %33 = OpLabel + %34 = OpFunctionCall %void %textureSampleCompare_af1051 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl index 772f21e636..c4cb087e5a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/af1051.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_af1051() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1i, 1.0f, vec2()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(1.0f), 1i, 1.0f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl index ea5645bd0b..548b87517d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_dd431d() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1i, 1.f); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(1.f), 1i, 1.f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl index 0c8a7fb928..56a5b3f588 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dd431d() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl index 0c8a7fb928..56a5b3f588 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dd431d() { - float res = arg_0.SampleCmp(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmp(arg_1, float3((1.0f).xx, float(1)), 1.0f); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl index db905e8419..b3fa41037c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompare_dd431d() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl index 50d2af1fd0..d265725b56 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_dd431d(depth2d_array tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1, 1.0f); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1, 1.0f); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm index f14e8bd306..31d965f6f1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 33 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,26 +27,29 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %20 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %29 = OpConstantNull %float %textureSampleCompare_dd431d = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %26 + %res = OpVariable %_ptr_Function_float Function %29 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %19 = OpConvertSToF %float %int_1 - %22 = OpCompositeConstruct %v3float %float_0 %float_0 %19 - %12 = OpImageSampleDrefImplicitLod %float %16 %22 %float_1 + %21 = OpCompositeExtract %float %20 0 + %22 = OpCompositeExtract %float %20 1 + %23 = OpConvertSToF %float %int_1 + %26 = OpCompositeConstruct %v3float %21 %22 %23 + %12 = OpImageSampleDrefImplicitLod %float %16 %26 %float_1 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSampleCompare_dd431d + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleCompare_dd431d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl index 1a8cfcb905..e3f8030dbe 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dd431d.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_dd431d() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1i, 1.0f); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(1.0f), 1i, 1.0f); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl index 74168e1d55..83b1e26eba 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_dec064() { - var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.f, vec2()); + var res: f32 = textureSampleCompare(arg_0, arg_1, vec2(1.f), 1.f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl index 04d19157eb..4db9f529d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dec064() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl index 04d19157eb..4db9f529d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dec064() { - float res = arg_0.SampleCmp(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmp(arg_1, (1.0f).xx, 1.0f, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl index 04d0da828e..f1d1987ce4 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompare_dec064() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl index 87c9f9b0c5..1714b591de 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_dec064(depth2d tint_symbol, sampler tint_symbol_1) { - float res = tint_symbol.sample_compare(tint_symbol_1, float2(0.0f), 1.0f, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, float2(1.0f), 1.0f, int2(1)); } fragment void fragment_main(depth2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm index 574e9c1d4d..1d736d1eda 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 30 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,25 +27,26 @@ %8 = OpTypeFunction %void %15 = OpTypeSampledImage %3 %v2float = OpTypeVector %float 2 - %18 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %19 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %22 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %25 = OpConstantNull %float + %26 = OpConstantNull %float %textureSampleCompare_dec064 = OpFunction %void None %8 %11 = OpLabel - %res = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %26 %13 = OpLoad %7 %arg_1 %14 = OpLoad %3 %arg_0 %16 = OpSampledImage %15 %14 %13 - %12 = OpImageSampleDrefImplicitLod %float %16 %18 %float_1 ConstOffset %22 + %12 = OpImageSampleDrefImplicitLod %float %16 %19 %float_1 ConstOffset %23 OpStore %res %12 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSampleCompare_dec064 + %28 = OpLabel + %29 = OpFunctionCall %void %textureSampleCompare_dec064 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl index 35620f4914..5cee6890aa 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompare/dec064.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_dec064() { - var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(), 1.0f, vec2()); + var res : f32 = textureSampleCompare(arg_0, arg_1, vec2(1.0f), 1.0f, vec2(1i)); } @fragment diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl index 7742bf33e5..668a2702e8 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1116ed() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1i, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.f), 1i, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl index e84193e394..23f5d430b0 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1116ed() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl index e84193e394..23f5d430b0 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1116ed() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl index 573c22cf39..c77d7e9194 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1)), 1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl index 822c2353bd..b1652c7b8b 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_1116ed(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1, 1.0f, level(0)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm index d347914eb6..1c01ce44cd 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,47 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_1116ed = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod %float_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleCompareLevel_1116ed +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompareLevel_1116ed + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_1116ed + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl index bdf67170d5..8a1f88cc85 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1116ed() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1i, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.0f), 1i, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl index f3a75dd1ea..af580e6e64 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1568e3() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl index 2a79a0f099..bdfef71e24 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1568e3() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl index 2a79a0f099..bdfef71e24 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1568e3() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xxx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl index f805d0d6c2..2205e4d2b5 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(1.0f), 1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl index 7dffcdd0f4..ed8c9f2fde 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_1568e3(depthcube tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(1.0f), 1.0f, level(0)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm index d85ceba045..7b336e2d48 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm @@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float %30 = OpTypeFunction %v4float @@ -55,7 +55,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod %float_0 + %19 = OpImageSampleDrefExplicitLod %float %23 %26 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl index f7d7d34d7d..30a988d711 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1568e3() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl index a8308e30e3..1f52f7f43e 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompareLevel_2ad2b1() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl index 999c761e1b..1bf32a35a5 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_2ad2b1() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl index 999c761e1b..1bf32a35a5 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_2ad2b1() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl index 1bdaf881e0..4a5b1aea03 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - float res = texture(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f)); + float res = texture(arg_0_arg_1, vec3(vec2(1.0f), 1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl index cc8b9a7815..ec2ed1f01d 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_2ad2b1(depth2d tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1.0f, level(0)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm index c97b96790c..0a3e8b9f8f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm @@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float %30 = OpTypeFunction %v4float @@ -55,7 +55,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod %float_0 + %19 = OpImageSampleDrefExplicitLod %float %23 %26 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl index 4eafbe218f..e715766161 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_2ad2b1() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl index 75f7335d4c..6406d088f8 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_4cf3a2() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1i, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(1.f), 1i, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl index 03160c2dbb..592137723f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_4cf3a2() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl index 03160c2dbb..592137723f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_4cf3a2() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl index 8f6c17ea46..eb1412b012 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_4cf3a2(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(1.0f), 1, 1.0f, level(0)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm index d4414e7a7b..44e64c3848 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,48 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_4cf3a2 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleDrefExplicitLod %float %23 %28 %float_1 Lod %float_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl index 6727920eaf..0d98a0fac6 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_4cf3a2() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1i, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(1.0f), 1i, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl index c27866b32b..3316156c27 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_7dc3c0() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1u, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.f), 1u, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl index 6c1d906867..e0be522930 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7dc3c0() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl index 6c1d906867..e0be522930 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7dc3c0() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl index 37e69e488c..db5ecc890c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - float res = texture(arg_0_arg_1, vec4(0.0f, 0.0f, float(1u), 1.0f)); + float res = texture(arg_0_arg_1, vec4(vec3(vec2(1.0f), float(1u)), 1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl index 3cf80ae027..02aa88150e 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_7dc3c0(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f, level(0)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm index a56b0ee4a0..d144689a58 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,47 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod %float_0 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl index 1e65a0868b..194ba5994c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_7dc3c0() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1u, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.0f), 1u, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl index 6cc8a39e9f..8a7f1ca42b 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_7f2b9a() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.f, vec2()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.f), 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl index 772accae57..b5a7b6403f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7f2b9a() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl index 772accae57..b5a7b6403f 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7f2b9a() { - float res = arg_0.SampleCmpLevelZero(arg_1, (0.0f).xx, 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl index cec13f16cc..9cd29f973b 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - float res = textureOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 1.0f), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(vec2(1.0f), 1.0f), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl index dbd5a686d1..35b8444932 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_7f2b9a(depth2d tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1.0f, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1.0f, level(0), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm index 98e9d4708b..298c2392b1 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,44 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %float_0 = OpConstant %float 0 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %30 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %textureSampleCompareLevel_7f2b9a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleDrefExplicitLod %float %23 %25 %float_1 Lod|ConstOffset %float_0 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %26 %float_1 Lod|ConstOffset %float_0 %31 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl index 360df23c2d..4d9f947a21 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_7f2b9a() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1.0f, vec2()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.0f), 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl index 42d6fb2336..0f80ec659c 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_958c87() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1u, 1.f); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(1.f), 1u, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl index 267052f1af..2b0a18d454 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_958c87() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl index 267052f1af..2b0a18d454 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_958c87() { - float res = arg_0.SampleCmpLevelZero(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float res = arg_0.SampleCmpLevelZero(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl index a46a09630e..8a6ee8a1e7 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_958c87(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(0.0f), 1u, 1.0f, level(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float3(1.0f), 1u, 1.0f, level(0)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm index 6669c55ff8..d1e88c10b4 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 50 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,48 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %37 = OpTypeFunction %v4float %textureSampleCompareLevel_958c87 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleDrefExplicitLod %float %23 %28 %float_1 Lod %float_0 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod %float_0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleCompareLevel_958c87 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleCompareLevel_958c87 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_958c87 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl index 7b6e087b57..b8e519d115 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/958c87.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_958c87() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(), 1u, 1.0f); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec3(1.0f), 1u, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl index 7b3f48bbb0..723be9a3f6 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_b6e47c() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1i, 1.f, vec2()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.f), 1i, 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl index 536d764095..77b7e86eee 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_b6e47c() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl index 536d764095..77b7e86eee 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_b6e47c() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl index 44343c716b..75ff04cad3 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_b6e47c(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1, 1.0f, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1, 1.0f, level(0), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm index 4194b1aa10..b65a7c2b17 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,49 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float + %39 = OpTypeFunction %v4float %textureSampleCompareLevel_b6e47c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod|ConstOffset %float_0 %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod|ConstOffset %float_0 %36 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl index 7214a20b5d..887ac6aaa6 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_b6e47c() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1i, 1.0f, vec2()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.0f), 1i, 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl index 59d04fbf3b..36d2f40ad2 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_bcb3dd() { - var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1u, 1.f, vec2()); + var res: f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.f), 1u, 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl index 25f2ddc01c..e0c9224ff7 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_bcb3dd() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl index 25f2ddc01c..e0c9224ff7 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_bcb3dd() { - float res = arg_0.SampleCmpLevelZero(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl index 035ddc3f40..4259a5c399 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_bcb3dd(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(0.0f), 1u, 1.0f, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, float2(1.0f), 1u, 1.0f, level(0), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm index a7672e5238..73aa482995 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,51 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 + %float_0 = OpConstant %float 0 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float + %41 = OpTypeFunction %v4float %textureSampleCompareLevel_bcb3dd = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleDrefExplicitLod %float %23 %29 %float_1 Lod|ConstOffset %float_0 %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleDrefExplicitLod %float %23 %33 %float_1 Lod|ConstOffset %float_0 %38 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl index 41956b8cde..4e68be368a 100644 --- a/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_bcb3dd() { - var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(), 1u, 1.0f, vec2()); + var res : f32 = textureSampleCompareLevel(arg_0, arg_1, vec2(1.0f), 1u, 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl index c84adf0b19..9d50e04af6 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_3d, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_21402b() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.f), vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl index 6012626387..31b2abe871 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_21402b() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl index 6012626387..31b2abe871 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_21402b() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl index 4810d976d9..9b6b7bff68 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl index e441de51be..0f86e1c116 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_21402b(texture3d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), gradient3d(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), gradient3d(float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm index 99b7b95778..01c9f62f0b 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.spvasm @@ -44,29 +44,29 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float -%_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureSampleGrad_21402b = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad %25 %25 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleGrad_21402b +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleGrad_21402b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl index d51d0951b7..89efe6ddbe 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/21402b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_21402b() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl index bcb2593896..b81aa6a1c4 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_2ecd8f() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1i, vec2(), vec2()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.f), 1i, vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl index 3d01c5add9..a835873047 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_2ecd8f() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl index 3d01c5add9..a835873047 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_2ecd8f() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl index 93bb758d13..d3ab105420 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl index 8b790203e9..2927067390 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_2ecd8f(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, gradient2d(float2(0.0f), float2(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, gradient2d(float2(1.0f), float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.spvasm index ec4ab9b07a..0abdf2244f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_2ecd8f = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad %31 %31 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %27 %27 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleGrad_2ecd8f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_2ecd8f + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleGrad_2ecd8f + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl index aa4204f32e..7ca3d1f476 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/2ecd8f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_2ecd8f() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1i, vec2(), vec2()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.0f), 1i, vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl index 6b6b77cc69..3379beee10 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d, sampler: sampler, coords: vec2, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_521263() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.f), vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl index f581e3013e..e45601c5fd 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_521263() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl index f581e3013e..e45601c5fd 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_521263() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl index 88da1c0f37..278070166a 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec4 res = textureGrad(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec4 res = textureGrad(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec4 res = textureGrad(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl index 902ba71b6b..6a4297e4f3 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_521263(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), gradient2d(float2(0.0f), float2(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), gradient2d(float2(1.0f), float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm index ac439059e2..6ad6311ec5 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.spvasm @@ -44,29 +44,29 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float -%_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureSampleGrad_521263 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad %25 %25 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleGrad_521263 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleGrad_521263 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl index d8ade17810..1deee69145 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/521263.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_521263() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl index 5bdc21b284..1cbe1252d8 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_cube, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_5312f4() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.f), vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl index 180ee4f81f..2839b8d61b 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5312f4() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl index 180ee4f81f..2839b8d61b 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5312f4() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl index 5f7c389b6e..a163aeb864 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl index 397cc5f3c1..d105445aac 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_5312f4(texturecube tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), gradientcube(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), gradientcube(float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm index 19283eec7f..30f8d9462d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.spvasm @@ -44,29 +44,29 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float -%_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureSampleGrad_5312f4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad %25 %25 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %28 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSampleGrad_5312f4 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureSampleGrad_5312f4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %33 = OpLabel - %34 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %34 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl index 53ed7ccab8..6d19e05b43 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5312f4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_5312f4() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl index 743623ace2..45d8aecd4e 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_3d, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3, @const offset: vec3) -> vec4 fn textureSampleGrad_5884dd() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3(), vec3()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.f), vec3(1.f), vec3(1.f), vec3(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl index 56c120b251..6454b45b82 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5884dd() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl index 56c120b251..6454b45b82 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5884dd() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0).xxx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xxx, (1.0f).xxx, (1.0f).xxx, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl index f5d0ae8afa..5be5d15f4b 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f), ivec3(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f), ivec3(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f), ivec3(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f), ivec3(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f), vec3(0.0f), vec3(0.0f), ivec3(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f), ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl index 7a7fc53aa5..024d415eda 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_5884dd(texture3d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), gradient3d(float3(0.0f), float3(0.0f)), int3(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), gradient3d(float3(1.0f), float3(1.0f)), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm index 2ca064c4fd..dff750a88b 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %28 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleGrad_5884dd = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad|ConstOffset %25 %25 %28 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad|ConstOffset %26 %26 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureSampleGrad_5884dd +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleGrad_5884dd + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_5884dd + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl index 88315962b0..67f251f9bd 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/5884dd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_5884dd() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), vec3(), vec3(), vec3()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.0f), vec3(1.0f), vec3(1.0f), vec3(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl index b6d18f5068..a4a558886c 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, ddx: vec2, ddy: vec2, @const offset: vec2) -> vec4 fn textureSampleGrad_7cd6de() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1u, vec2(), vec2(), vec2()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.f), 1u, vec2(1.f), vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl index 6a9c86c32c..3336bc5621 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_7cd6de() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl index 6a9c86c32c..3336bc5621 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_7cd6de() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl index d56773c776..82bb5d03ba 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl index 06c4d90b39..ef3b01d71c 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_7cd6de(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f)), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, gradient2d(float2(1.0f), float2(1.0f)), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm index 1513358db9..2db04bcc8a 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,48 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleGrad_7cd6de = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad|ConstOffset %31 %31 %34 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad|ConstOffset %27 %27 %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSampleGrad_7cd6de +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleGrad_7cd6de + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureSampleGrad_7cd6de + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl index ae06e6457b..aa33eefae4 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/7cd6de.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_7cd6de() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1u, vec2(), vec2(), vec2()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.0f), 1u, vec2(1.0f), vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl index 5e9988eaa2..f91acf5f88 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_a09131() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1u, vec2(), vec2()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.f), 1u, vec2(1.f), vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl index 24569b5b86..42d3d4af43 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_a09131() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl index 24569b5b86..42d3d4af43 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_a09131() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1u)), (0.0f).xx, (0.0f).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1u)), (1.0f).xx, (1.0f).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl index 8667462d28..56f8737590 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec4 res = textureGrad(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), vec2(0.0f), vec2(0.0f)); + vec4 res = textureGrad(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), vec2(1.0f), vec2(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl index ae0a0d9cfc..3fa071039d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_a09131(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, gradient2d(float2(0.0f), float2(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, gradient2d(float2(1.0f), float2(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm index c5bbfc234a..cdd9b3002f 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %_ptr_Function_v4float = OpTypePointer Function %v4float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_a09131 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad %31 %31 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %27 %27 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleGrad_a09131 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_a09131 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleGrad_a09131 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl index 212ffa8a01..eaec345657 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/a09131.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_a09131() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1u, vec2(), vec2()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.0f), 1u, vec2(1.0f), vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl index 8e3968d7d5..a26664833c 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_bbb58f() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), 1u, vec3(), vec3()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.f), 1u, vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl index 8c07d5e06c..fa78b8fee9 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_bbb58f() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1u)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl index 8c07d5e06c..fa78b8fee9 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_bbb58f() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1u)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl index 2cf113eb4d..211c87f50d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_bbb58f(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, gradientcube(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, gradientcube(float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm index 35a94b947a..79969b6f9e 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %v3float = OpTypeVector %float 3 - %30 = OpConstantNull %v3float %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_bbb58f = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Grad %30 %30 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleGrad_bbb58f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleGrad_bbb58f + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleGrad_bbb58f + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl index b766ec2873..b2672b8c07 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/bbb58f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_bbb58f() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), 1u, vec3(), vec3()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.0f), 1u, vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl index 40ce7dd897..59f4146140 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d, sampler: sampler, coords: vec2, ddx: vec2, ddy: vec2, @const offset: vec2) -> vec4 fn textureSampleGrad_d4e3c5() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2(), vec2()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.f), vec2(1.f), vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl index 6ec5b46654..abee8b8ec1 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d4e3c5() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl index 6ec5b46654..abee8b8ec1 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d4e3c5() { - float4 res = arg_0.SampleGrad(arg_1, (0.0f).xx, (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, (1.0f).xx, (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl index 21f3947b20..7eee4a3e2b 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec4 res = textureGradOffset(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec4 res = textureGradOffset(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec4 res = textureGradOffset(arg_0_arg_1, vec2(0.0f), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl index 7b6d2955df..46f7401ca4 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_d4e3c5(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), gradient2d(float2(0.0f), float2(0.0f)), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), gradient2d(float2(1.0f), float2(1.0f)), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm index cdcaae1234..3156b3c331 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %28 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleGrad_d4e3c5 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Grad|ConstOffset %25 %25 %28 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Grad|ConstOffset %26 %26 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureSampleGrad_d4e3c5 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleGrad_d4e3c5 + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleGrad_d4e3c5 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl index af2f0c48c6..7a99649f86 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d4e3c5.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_d4e3c5() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), vec2(), vec2(), vec2()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.0f), vec2(1.0f), vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl index e287fbe0d2..3536a86a57 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, ddx: vec2, ddy: vec2, @const offset: vec2) -> vec4 fn textureSampleGrad_d65515() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1i, vec2(), vec2(), vec2()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.f), 1i, vec2(1.f), vec2(1.f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl index 6a31475ce9..5b138512d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d65515() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl index 6a31475ce9..5b138512d1 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d65515() { - float4 res = arg_0.SampleGrad(arg_1, float3(0.0f, 0.0f, float(1)), (0.0f).xx, (0.0f).xx, (0).xx); + float4 res = arg_0.SampleGrad(arg_1, float3((1.0f).xx, float(1)), (1.0f).xx, (1.0f).xx, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl index 3857b5751a..8e08c66e0b 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec4 res = textureGradOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), vec2(0.0f), vec2(0.0f), ivec2(0)); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), vec2(1.0f), vec2(1.0f), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl index 84f4c0c7b1..b269220f8a 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_d65515(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, gradient2d(float2(0.0f), float2(0.0f)), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, gradient2d(float2(1.0f), float2(1.0f)), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm index 70acbbc0f7..2feaabd90d 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %v2float = OpTypeVector %float 2 - %31 = OpConstantNull %v2float %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleGrad_d65515 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Grad|ConstOffset %31 %31 %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad|ConstOffset %27 %27 %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleGrad_d65515 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleGrad_d65515 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleGrad_d65515 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl index ed2ec94c58..e627316004 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/d65515.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_d65515() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(), 1i, vec2(), vec2(), vec2()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec2(1.0f), 1i, vec2(1.0f), vec2(1.0f), vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl index 3efc53782c..faabeef4fd 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl @@ -25,7 +25,7 @@ // fn textureSampleGrad(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_e383db() { - var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(), 1i, vec3(), vec3()); + var res: vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.f), 1i, vec3(1.f), vec3(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl index 990fc90b9e..87c187da30 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_e383db() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl index 990fc90b9e..87c187da30 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_e383db() { - float4 res = arg_0.SampleGrad(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), (0.0f).xxx, (0.0f).xxx); + float4 res = arg_0.SampleGrad(arg_1, float4((1.0f).xxx, float(1)), (1.0f).xxx, (1.0f).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl index fcee1d0eb3..2ce087fc5e 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleGrad_e383db(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, gradientcube(float3(0.0f), float3(0.0f))); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, gradientcube(float3(1.0f), float3(1.0f))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm index a5cff357e9..0e311b6555 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %v3float = OpTypeVector %float 3 - %30 = OpConstantNull %v3float %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpTypeFunction %v4float %textureSampleGrad_e383db = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Grad %30 %30 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Grad %26 %26 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleGrad_e383db +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleGrad_e383db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleGrad_e383db + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleGrad_e383db OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleGrad_e383db + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleGrad_e383db OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl index 6652bb639d..8dfe9aedb9 100644 --- a/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleGrad/e383db.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_e383db() { - var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(), 1i, vec3(), vec3()); + var res : vec4 = textureSampleGrad(arg_0, arg_1, vec3(1.0f), 1i, vec3(1.0f), vec3(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl index ffa7af3929..dc50131e4e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: i32) -> f32 fn textureSampleLevel_02be59() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl index 9af06cba51..805efd4d93 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_02be59() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl index 9af06cba51..805efd4d93 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_02be59() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl index 249934820b..50224c5851 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl index cf6e1f545e..fe833d5602 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_02be59(depth2d tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm index 12c1f88658..e1b7508f39 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.spvasm @@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_02be59 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_02be59 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_02be59 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl index 21cd349a15..bb6778c7bd 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/02be59.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_02be59() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl index 31146d22ba..f5a413c7a9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_0b0a1b() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.f, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl index aee4c233d2..c221b22dac 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0b0a1b() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl index aee4c233d2..c221b22dac 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0b0a1b() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl index ef80252f31..b48955975a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec4 res = textureLodOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec4 res = textureLodOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec4 res = textureLodOffset(arg_0_arg_1, vec2(0.0f), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec2(1.0f), 1.0f, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl index 506a971caa..4bd6966f06 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_0b0a1b(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1.0f), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1.0f), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm index fd46b38f9f..e75df16858 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %textureSampleLevel_0b0a1b = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod|ConstOffset %float_1 %29 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod|ConstOffset %float_1 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_0b0a1b +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_0b0a1b + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_0b0a1b + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl index 6ae1c9ed36..7edb2c2dd1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0b0a1b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_0b0a1b() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0f, vec2()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl index 6129b9cb3a..046acf8d15 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_0bdd9a() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1i, 1.f); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1i, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl index 4ac5b0c514..3062bda0b1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0bdd9a() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl index 4ac5b0c514..3062bda0b1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0bdd9a() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl index 8d56eb601b..7a8b3409be 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_0bdd9a(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, level(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm index 6c66663498..c38f645199 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_0bdd9a = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertSToF %float %int_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Lod %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_0bdd9a +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_0bdd9a + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_0bdd9a + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl index d49f2c265c..96d9d06803 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/0bdd9a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_0bdd9a() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1i, 1.0f); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1i, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl index 34cbdc174d..3c03f3f467 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3, level: i32) -> f32 fn textureSampleLevel_1b0291() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl index e474a0f05a..43340f612f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1b0291() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl index e474a0f05a..43340f612f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1b0291() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl index 28c9eed991..85b398cb86 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_1b0291(depthcube tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm index 9a1b35c7aa..313063a9d0 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.spvasm @@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %26 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_1b0291 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_1b0291 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_1b0291 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl index da43fb41d0..ce70fc6d85 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1b0291.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1b0291() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl index 98e076331c..05f8d4d456 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: i32) -> f32 fn textureSampleLevel_1bf73e() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl index 6a8dc7424f..acc99fc843 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1bf73e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl index 6a8dc7424f..acc99fc843 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1bf73e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl index 3d0008298f..9206ceee56 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_1bf73e(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm index 75690ee10a..2d0c3097c5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_1bf73e = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleLevel_1bf73e +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_1bf73e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_1bf73e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl index e42cc19095..a0cfa860b1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/1bf73e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1bf73e() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl index 2330cfb440..0acaaacc30 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: f32) -> vec4 fn textureSampleLevel_265cc7() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1.f); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl index bb1367391c..5a8cae5d68 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_265cc7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl index bb1367391c..5a8cae5d68 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_265cc7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl index 454d56b024..12caf9bb6e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl index c512ee7420..d3fa969ddc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_265cc7(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm index 1d5cd88cf4..a9b4a828e9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_265cc7 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_265cc7 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_265cc7 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %44 = OpLabel %45 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_265cc7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl index 00932faf39..bbd333bf30 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/265cc7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_265cc7() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1.0f); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl index 3343ac7af4..7be0912836 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: u32) -> f32 fn textureSampleLevel_2974eb() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl index d761407693..40a8222530 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_2974eb() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl index d761407693..40a8222530 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_2974eb() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl index 35c814215d..5d25c30644 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_2974eb(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm index 902d1d2969..c418b62dea 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_2974eb = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_2974eb +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_2974eb - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %48 = OpLabel %49 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_2974eb + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl index a01f59b671..660393ef5c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/2974eb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_2974eb() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl index 8673fe749b..4a67499138 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_302be4() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1.f); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl index 90cdd653d3..07474bcb85 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_302be4() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl index 90cdd653d3..07474bcb85 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_302be4() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl index 31ba66c04d..f69611e22c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl index 92ace1e5ec..cb2e2ab19a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_302be4(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm index 19dc29b7e3..3607b90ff3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,43 +44,46 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_302be4 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod %float_1 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_302be4 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_302be4 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %44 = OpLabel %45 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_302be4 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl index 846f87f09e..106bdbd028 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/302be4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_302be4() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1.0f); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl index 250369f0a1..d1713ea3e6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: i32, @const offset: vec2) -> f32 fn textureSampleLevel_36780e() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1i, vec2()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i, 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl index 7defa37f65..c8a9ccca7c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36780e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl index 7defa37f65..c8a9ccca7c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36780e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl index f77682e405..ed1e29efcc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_36780e(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm index 1dc3c0ddb2..cc74784ab2 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_36780e = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %33 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %37 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_36780e +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_36780e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_36780e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %48 = OpLabel %49 = OpFunctionCall %void %textureSampleLevel_36780e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_36780e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl index 09aa6a35cf..b079b1d521 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36780e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_36780e() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1i, vec2()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i, 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl index a9d9e0fea3..fd7d10b8d5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: u32, @const offset: vec2) -> f32 fn textureSampleLevel_36f0d3() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1u, vec2()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i, 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl index b36c7131aa..e8395d5b38 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36f0d3() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl index b36c7131aa..e8395d5b38 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36f0d3() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1u, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl index a952104ea4..c52850d1dc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_36f0d3(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1u), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1u), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm index aaa56db665..aaca286744 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,49 +44,52 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %39 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureSampleLevel_36f0d3 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %35 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %39 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_36f0d3 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_36f0d3 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %50 = OpLabel %51 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_36f0d3 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl index 79a45ec860..ae7e18a043 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/36f0d3.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_36f0d3() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1u, vec2()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i, 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl index 3d2edc92f2..1e317bd33a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: i32) -> f32 fn textureSampleLevel_3c3442() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl index 39cd161891..f66c85a563 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_3c3442() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl index 39cd161891..f66c85a563 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_3c3442() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl index ce8ebea205..32dbc4143a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_3c3442(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm index 23006328a9..3e0fb12e99 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,47 +44,50 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_3c3442 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_3c3442 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_3c3442 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %48 = OpLabel %49 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_3c3442 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl index 62d0573eca..a9c602cafa 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/3c3442.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_3c3442() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl index 65526830b9..886c480e95 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: u32) -> f32 fn textureSampleLevel_615583() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl index 634fa95003..d758f54f7f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_615583() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl index 634fa95003..d758f54f7f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_615583() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl index 8647ff8a48..ec871ef248 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_615583(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm index 999d156fb5..3110bc14e4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_615583 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod %31 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleLevel_615583 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_615583 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_615583 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureSampleLevel_615583 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_615583 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl index 149d95ccdc..87e11d185e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/615583.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_615583() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl index 4bf7198c11..ba930c6f98 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: u32) -> f32 fn textureSampleLevel_73e892() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl index 96a98066b1..3a307b4390 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_73e892() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl index 96a98066b1..3a307b4390 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_73e892() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl index 97133979d2..bc67215e7f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - float res = textureLod(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u)); + float res = textureLod(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl index 4ab087d32d..976edd5080 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_73e892(depth2d tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm index 821a1cee79..c3d77431d9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.spvasm @@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_73e892 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_73e892 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_73e892 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl index 9c08bdda04..86e1fe5234 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/73e892.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_73e892() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl index b89cce6e8a..04f0fc8955 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: i32, @const offset: vec2) -> f32 fn textureSampleLevel_749baf() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, vec2()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl index ca148dfc15..c269b22cff 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_749baf() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl index ca148dfc15..c269b22cff 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_749baf() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl index 386d748af2..dffb2b43ec 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl index 4a19d9f888..4dbec7a1d3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_749baf(depth2d tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm index 449a76fe55..ff468d329a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.spvasm @@ -44,35 +44,35 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %31 = OpConstantNull %v2int + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureSampleLevel_749baf = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod|ConstOffset %27 %31 + %28 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod|ConstOffset %28 %32 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureSampleLevel_749baf +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureSampleLevel_749baf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl index af1e33b525..e529df8785 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/749baf.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_749baf() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, vec2()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl index 808785ef65..ff080e17be 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32, level: u32) -> f32 fn textureSampleLevel_941a53() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1u, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl index 45085b5dbe..b69f521a1e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_941a53() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl index 45085b5dbe..b69f521a1e 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_941a53() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl index 148a59430d..ae0a450548 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_941a53(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, level(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm index 5bc015b1ee..30fc42f6f6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_941a53 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_941a53 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleLevel_941a53 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_941a53 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl index 66ad48b094..719add10d9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/941a53.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_941a53() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1u, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1u, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl index 943d287668..8743f47a50 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2) -> vec4 fn textureSampleLevel_979816() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl index 0d69ae7b27..02e88ee9e3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.dxc.hlsl @@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f)); ^^^^^^^^^^^^^^^^^^ struct GammaTransferParams { @@ -85,7 +85,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleLevel_979816() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl index 0d69ae7b27..02e88ee9e3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.fxc.hlsl @@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f)); ^^^^^^^^^^^^^^^^^^ struct GammaTransferParams { @@ -85,7 +85,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleLevel_979816() { - float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (0.0f).xx, tint_symbol_1(ext_tex_params, 0u)); + float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, (1.0f).xx, tint_symbol_1(ext_tex_params, 0u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl index c826300e7a..2edd5001cc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.glsl @@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f)); ^^^^^^^^^^^^^^^^^^ #version 310 es @@ -54,7 +54,7 @@ vec4 textureSampleExternal(highp sampler2D plane0_smp, highp sampler2D plane1_sm uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } vec4 vertex_main() { @@ -123,7 +123,7 @@ vec4 textureSampleExternal(highp sampler2D plane0_smp, highp sampler2D plane1_sm uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void fragment_main() { @@ -186,7 +186,7 @@ vec4 textureSampleExternal(highp sampler2D plane0_smp, highp sampler2D plane1_sm uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(0.0f), ext_tex_params.inner); + vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, vec2(1.0f), ext_tex_params.inner); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl index 1d078bbfb6..3820718bb9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.msl @@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f)); ^^^^^^^^^^^^^^^^^^ #include @@ -62,7 +62,7 @@ float4 textureSampleExternal(texture2d plane0, texture2d< } void textureSampleLevel_979816(texture2d tint_symbol_1, texture2d tint_symbol_2, sampler tint_symbol_3, const constant ExternalTextureParams* const tint_symbol_4) { - float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(0.0f), *(tint_symbol_4)); + float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, float2(1.0f), *(tint_symbol_4)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm index e5131422f5..8842b64abb 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.spvasm @@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f)); ^^^^^^^^^^^^^^^^^^ ; SPIR-V @@ -123,7 +123,7 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprec %98 = OpConstantNull %uint %void = OpTypeVoid %116 = OpTypeFunction %void - %124 = OpConstantNull %v2float + %124 = OpConstantComposite %v2float %float_1 %float_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl index 5e78e8435c..db847872fc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/979816.wgsl.expected.wgsl @@ -1,5 +1,5 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprecated builtin - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f)); ^^^^^^^^^^^^^^^^^^ @group(1) @binding(0) var arg_0 : texture_external; @@ -7,7 +7,7 @@ builtins/gen/literal/textureSampleLevel/979816.wgsl:28:24 warning: use of deprec @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_979816() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl index d02337a9de..00c7285b48 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: u32) -> f32 fn textureSampleLevel_a12142() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1i, 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl index 881bbdb381..e4c44df00d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_a12142() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl index 881bbdb381..e4c44df00d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_a12142() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1u).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl index e2e6c7d8ee..f97f541813 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_a12142(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, level(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm index e3114b3998..2122eecf76 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,47 +44,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_a12142 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_a12142 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_a12142 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_a12142 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl index 66448108ad..4e2fc47ad2 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/a12142.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_a12142() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1i, 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1i, 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl index 47bc418201..1bf1c31166 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32, level: f32) -> vec4 fn textureSampleLevel_aab3b9() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1u, 1.f); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1u, 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl index 3ff9d7d5c7..f7a6308f9b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_aab3b9() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl index 3ff9d7d5c7..f7a6308f9b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_aab3b9() { - float4 res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1.0f); + float4 res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl index e1f41e09db..4fa3fa2fa9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_aab3b9(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, level(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm index 272d846e01..0eb8e9deb7 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 49 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,43 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_aab3b9 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %25 = OpConvertUToF %float %uint_1 - %28 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %25 - %19 = OpImageSampleExplicitLod %v4float %23 %28 Lod %float_1 + %27 = OpCompositeExtract %float %26 0 + %28 = OpCompositeExtract %float %26 1 + %29 = OpCompositeExtract %float %26 2 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v4float %27 %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_aab3b9 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_aab3b9 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_aab3b9 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl index 237662c422..3de46ba8a5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/aab3b9.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_aab3b9() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1u, 1.0f); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1u, 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl index 25468bfec4..1a5dae4a55 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_abfcc0() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.f); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl index 5986acede1..b6d9aa9441 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_abfcc0() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl index 5986acede1..b6d9aa9441 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_abfcc0() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl index 866afa3b4d..709cf7e655 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl index 26f2cb2781..c5b55d17d5 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_abfcc0(texture3d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm index e86f2fbaae..f1c7a852ee 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.spvasm @@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureSampleLevel_abfcc0 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod %float_1 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl index b7ef5ae6d7..adffde9b9f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/abfcc0.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_abfcc0() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0f); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl index 132144928f..4e72aec4ff 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: i32) -> f32 fn textureSampleLevel_ae5e39() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1i, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl index 2a898408d4..55157003b3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae5e39() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl index 2a898408d4..55157003b3 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae5e39() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl index 7f710a2ed8..1e48987651 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ae5e39(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1, level(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm index e6ebe892b0..68f32e3cee 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 51 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,45 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureSampleLevel_ae5e39 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertSToF %float %int_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleLevel_ae5e39 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleLevel_ae5e39 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleLevel_ae5e39 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl index 297a5cfb51..30a48b2342 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae5e39.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ae5e39() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1i, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1i, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl index c352dee9ba..5360c5edd6 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3, level: u32) -> f32 fn textureSampleLevel_ae92a2() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1u); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl index f0daf77334..fee35d58e4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae92a2() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl index f0daf77334..fee35d58e4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae92a2() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1u).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1u).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl index fe37bb01d2..46e2a3edb4 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ae92a2(depthcube tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1u)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm index 0f6a5496ba..d6313a8653 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.spvasm @@ -44,33 +44,33 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %26 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %33 = OpTypeFunction %v4float %textureSampleLevel_ae92a2 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod %27 + %28 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod %28 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_ae92a2 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_ae92a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl index c485be4e98..674aea272d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ae92a2.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ae92a2() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1u); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1u); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl index d8fefeeaef..911fd7fcd9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_b7c55c() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1.f, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1i, 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl index 2f3441f975..040aa64edd 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_b7c55c() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl index 2f3441f975..040aa64edd 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_b7c55c() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl index 31e57047bc..90dbca932a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1)), 1.0f, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl index 8847f18bb0..c0c5d5565a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_b7c55c(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1, level(1.0f), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1, level(1.0f), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm index 2f007230a5..da6f290b9c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,45 +44,48 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %float_1 = OpConstant %float 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %38 = OpTypeFunction %v4float %textureSampleLevel_b7c55c = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertSToF %float %int_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod|ConstOffset %float_1 %32 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertSToF %float %int_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod|ConstOffset %float_1 %35 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_b7c55c +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_b7c55c - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %46 = OpLabel %47 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_b7c55c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl index b4b4642e06..b156633a96 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/b7c55c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_b7c55c() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1i, 1.0f, vec2()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1i, 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl index bb02ef2ae4..dcb31e4849 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_c32df7() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.f); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl index d48cf54ade..aabe9e46b8 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c32df7() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl index d48cf54ade..aabe9e46b8 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c32df7() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl index af5177b85c..4d759270aa 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec4 res = textureLod(arg_0_arg_1, vec3(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec3(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl index d6a2800256..bafe9af66d 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_c32df7(texturecube tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm index 5daeeb2778..d76fe25607 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.spvasm @@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureSampleLevel_c32df7 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod %float_1 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl index 3aaea11c55..83ec451f13 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c32df7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c32df7() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0f); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl index 7874b9b5d2..8017850216 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32) -> vec4 fn textureSampleLevel_c6aca6() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.f); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1.f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl index 4455778471..7fe645bc88 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c6aca6() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl index 4455778471..7fe645bc88 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c6aca6() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1.0f); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1.0f); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl index b2e3dd0840..62c64c1713 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec4 res = textureLod(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec2(1.0f), 1.0f); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec4 res = textureLod(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec2(1.0f), 1.0f); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec4 res = textureLod(arg_0_arg_1, vec2(0.0f), 1.0f); + vec4 res = textureLod(arg_0_arg_1, vec2(1.0f), 1.0f); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl index a24cb0f08f..479716569b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_c6aca6(texture2d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1.0f)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1.0f)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm index 7a940972ab..9dd42e1bb1 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.spvasm @@ -44,8 +44,8 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %25 = OpConstantNull %v2float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %29 = OpTypeFunction %v4float %textureSampleLevel_c6aca6 = OpFunction %void None %15 @@ -54,7 +54,7 @@ %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod %float_1 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod %float_1 OpStore %res %19 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl index 535b735b8f..256eda0d98 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/c6aca6.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c6aca6() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1.0f); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1.0f); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl index 5f1ee66b28..218f8be29f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: u32, @const offset: vec2) -> f32 fn textureSampleLevel_cdfe0f() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1u, vec2()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u, 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl index 749bfc86d4..d9b4c1e75f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_cdfe0f() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl index 749bfc86d4..d9b4c1e75f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_cdfe0f() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1u, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl index 693c3f3782..5c73085356 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_cdfe0f(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1u), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1u), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm index 62f94db927..9af914caba 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,48 +44,52 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %39 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureSampleLevel_cdfe0f = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %34 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %39 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSampleLevel_cdfe0f +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_cdfe0f + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureSampleLevel_cdfe0f + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl index fa05fe7088..afdb69d052 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/cdfe0f.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_cdfe0f() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1u, vec2()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u, 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl index 3390f5bca1..f6ea28589f 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32, @const offset: vec3) -> vec4 fn textureSampleLevel_dcbecb() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.f, vec3()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1.f, vec3(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl index 806a05fd03..044f68a4b9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_dcbecb() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl index 806a05fd03..044f68a4b9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_dcbecb() { - float4 res = arg_0.SampleLevel(arg_1, (0.0f).xxx, 1.0f, (0).xxx); + float4 res = arg_0.SampleLevel(arg_1, (1.0f).xxx, 1.0f, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl index 6b2a1816de..148bef4712 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f), 1.0f, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(1.0f), 1.0f, ivec3(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f), 1.0f, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(1.0f), 1.0f, ivec3(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f), 1.0f, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(1.0f), 1.0f, ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl index 2eaac72baf..47f3e27eca 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_dcbecb(texture3d tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), level(1.0f), int3(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), level(1.0f), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm index 6b3a57e311..9a1e5339f9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,42 +44,43 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %25 = OpConstantNull %v3float %float_1 = OpConstant %float 1 + %26 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %29 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %30 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %textureSampleLevel_dcbecb = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %19 = OpImageSampleExplicitLod %v4float %23 %25 Lod|ConstOffset %float_1 %29 + %19 = OpImageSampleExplicitLod %v4float %23 %26 Lod|ConstOffset %float_1 %30 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureSampleLevel_dcbecb +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_dcbecb + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_dcbecb + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl index bdcaff8d2d..e4610adbfc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/dcbecb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_dcbecb() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(), 1.0f, vec3()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1.0f, vec3(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl index 7894b7038f..9135882c18 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: i32, @const offset: vec2) -> f32 fn textureSampleLevel_e6ce9e() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1i, vec2()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u, 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl index 62c3ca358f..9b08da0d23 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_e6ce9e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl index 62c3ca358f..9b08da0d23 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_e6ce9e() { - float res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl index cdf6cd4687..42a5ff3be7 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_e6ce9e(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm index 387a582435..558fb6469a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,49 +44,52 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %28 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %39 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureSampleLevel_e6ce9e = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertUToF %float %uint_1 - %30 = OpCompositeConstruct %v3float %float_0 %float_0 %27 - %31 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %30 Lod|ConstOffset %31 %35 + %29 = OpCompositeExtract %float %28 0 + %30 = OpCompositeExtract %float %28 1 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v3float %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod|ConstOffset %35 %39 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_e6ce9e +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_e6ce9e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %15 %50 = OpLabel %51 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %15 + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_e6ce9e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl index 765f731a9c..3936c9ceb0 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/e6ce9e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_e6ce9e() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1i, vec2()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u, 1i, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl index 0ce14c62de..ee35dd7f68 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: u32, @const offset: vec2) -> f32 fn textureSampleLevel_f3b2c8() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, vec2()); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl index 81096d4842..7b839f1408 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_f3b2c8() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl index 81096d4842..7b839f1408 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_f3b2c8() { - float res = arg_0.SampleLevel(arg_1, (0.0f).xx, 1u, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, (1.0f).xx, 1u, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl index 503a1bc1b3..eab0c1b9a2 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u), ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u), ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - float res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, 0.0f), float(1u), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), 0.0f), float(1u), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl index 1d3faeae66..6028f54bea 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_f3b2c8(depth2d tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), level(1u), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), level(1u), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm index d98a8b7198..f20fef65a2 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 %v2float = OpTypeVector %float 2 - %26 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %34 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpTypeFunction %v4float %textureSampleLevel_f3b2c8 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %27 = OpConvertSToF %float %uint_1 - %20 = OpImageSampleExplicitLod %v4float %24 %26 Lod|ConstOffset %27 %32 + %28 = OpConvertSToF %float %uint_1 + %20 = OpImageSampleExplicitLod %v4float %24 %27 Lod|ConstOffset %28 %34 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_f3b2c8 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_f3b2c8 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl index 8ffb28cadb..8057db709b 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/f3b2c8.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_f3b2c8() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, vec2()); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl index d9217fb142..4d9e464106 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_faa6d7() { - var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1.f, vec2()); + var res: vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.f), 1u, 1.f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl index 5646cefa8e..f5a020b036 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_faa6d7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl index 5646cefa8e..f5a020b036 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_faa6d7() { - float4 res = arg_0.SampleLevel(arg_1, float3(0.0f, 0.0f, float(1u)), 1.0f, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3((1.0f).xx, float(1u)), 1.0f, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl index 9c1734cdb1..b272e8fcfa 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } vec4 vertex_main() { @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void fragment_main() { @@ -41,7 +41,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec4 res = textureLodOffset(arg_0_arg_1, vec3(0.0f, 0.0f, float(1u)), 1.0f, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(vec2(1.0f), float(1u)), 1.0f, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl index a0039f05a9..795ca06377 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_faa6d7(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float4 res = tint_symbol_1.sample(tint_symbol_2, float2(0.0f), 1u, level(1.0f), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, float2(1.0f), 1u, level(1.0f), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm index 74736efe7b..08a0c14e6a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,50 @@ %15 = OpTypeFunction %void %22 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 - %float_0 = OpConstant %float 0 + %v2float = OpTypeVector %float 2 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v2float %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %float_1 = OpConstant %float 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %textureSampleLevel_faa6d7 = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_v4float Function %5 %20 = OpLoad %14 %arg_1 %21 = OpLoad %11 %arg_0 %23 = OpSampledImage %22 %21 %20 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v3float %float_0 %float_0 %26 - %19 = OpImageSampleExplicitLod %v4float %23 %29 Lod|ConstOffset %float_1 %33 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpConvertUToF %float %uint_1 + %33 = OpCompositeConstruct %v3float %28 %29 %30 + %19 = OpImageSampleExplicitLod %v4float %23 %33 Lod|ConstOffset %float_1 %37 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSampleLevel_faa6d7 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_faa6d7 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_faa6d7 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl index 14a47e4fd2..6799d8b68a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/faa6d7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_faa6d7() { - var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(), 1u, 1.0f, vec2()); + var res : vec4 = textureSampleLevel(arg_0, arg_1, vec2(1.0f), 1u, 1.0f, vec2(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl index 6407b2c677..c7af8202f9 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32, level: i32) -> f32 fn textureSampleLevel_ff11bc() { - var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1u, 1i); + var res: f32 = textureSampleLevel(arg_0, arg_1, vec3(1.f), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl index aaffccfb58..4a5f8d1fdc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ff11bc() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl index aaffccfb58..4a5f8d1fdc 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ff11bc() { - float res = arg_0.SampleLevel(arg_1, float4(0.0f, 0.0f, 0.0f, float(1u)), 1).x; + float res = arg_0.SampleLevel(arg_1, float4((1.0f).xxx, float(1u)), 1).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl index 2791c64839..03bdbc094c 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ff11bc(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float res = tint_symbol_1.sample(tint_symbol_2, float3(0.0f), 1u, level(1)); + float res = tint_symbol_1.sample(tint_symbol_2, float3(1.0f), 1u, level(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm index 9fb572aebe..64f921e085 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 53 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -44,47 +44,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %23 = OpTypeSampledImage %11 - %float_0 = OpConstant %float 0 + %v3float = OpTypeVector %float 3 + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_float = OpTypePointer Function %float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpTypeFunction %v4float %textureSampleLevel_ff11bc = OpFunction %void None %15 %18 = OpLabel %res = OpVariable %_ptr_Function_float Function %8 %21 = OpLoad %14 %arg_1 %22 = OpLoad %11 %arg_0 %24 = OpSampledImage %23 %22 %21 - %26 = OpConvertUToF %float %uint_1 - %29 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %26 - %30 = OpConvertSToF %float %int_1 - %20 = OpImageSampleExplicitLod %v4float %24 %29 Lod %30 + %28 = OpCompositeExtract %float %27 0 + %29 = OpCompositeExtract %float %27 1 + %30 = OpCompositeExtract %float %27 2 + %31 = OpConvertUToF %float %uint_1 + %34 = OpCompositeConstruct %v4float %28 %29 %30 %31 + %35 = OpConvertSToF %float %int_1 + %20 = OpImageSampleExplicitLod %v4float %24 %34 Lod %35 %19 = OpCompositeExtract %float %20 0 OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_ff11bc +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_ff11bc + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleLevel_ff11bc + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl index 43278ddd10..eff31bbc4a 100644 --- a/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureSampleLevel/ff11bc.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ff11bc() { - var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(), 1u, 1i); + var res : f32 = textureSampleLevel(arg_0, arg_1, vec3(1.0f), 1u, 1i); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl index 127f5d63a2..6de2b0910a 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_00ca64() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl index 4c43d0996a..8e8c41883c 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_00ca64() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl index 4c43d0996a..8e8c41883c 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_00ca64() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl index 1227661c63..5a72fd2b40 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl index 61e534f195..b76f874921 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_00ca64(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm index ec49a658b9..c32fe12ad7 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_00ca64 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_00ca64 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_00ca64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_00ca64 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_00ca64 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_00ca64 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_00ca64 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl index 6bc9e2ce70..33756f1476 100644 --- a/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/00ca64.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_00ca64() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl index 10d0c4e421..b77e65ef9a 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_0148bd() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl index 49a4ea9876..6c96325802 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0148bd() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl index 49a4ea9876..6c96325802 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0148bd() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl index 5b2168ae03..15f4a41569 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl index 508c6535ff..30137a65be 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_0148bd(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm index 464aac994f..9992d94ac9 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0148bd = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_0148bd +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_0148bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0148bd + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_0148bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_0148bd + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_0148bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl index b9cae8b38e..6b62b187aa 100644 --- a/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0148bd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_0148bd() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl index dac61fd960..a03c257ac4 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_05ce15() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl index 27477b0e4d..bda2006d42 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_05ce15() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl index 27477b0e4d..bda2006d42 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_05ce15() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl index 38abe73938..5021ed42ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl index 3a48638c93..e99c331313 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_05ce15(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.spvasm index d7dca2f5ee..250c8ebcb6 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_05ce15 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_05ce15 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_05ce15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_05ce15 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_05ce15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_05ce15 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_05ce15 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl index caefa60386..e5609b3acf 100644 --- a/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/05ce15.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_05ce15() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl index fa8db6a607..91a9450d4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_064c7f() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl index c9130d7495..4c98b689d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_064c7f() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl index c9130d7495..4c98b689d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_064c7f() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl index 06feb27cf8..9165cd375f 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_064c7f(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.spvasm index 4e3a75611c..52c7fa75c3 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,34 +39,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_064c7f = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_064c7f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_064c7f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_064c7f + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_064c7f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_064c7f + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_064c7f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl index 9d552595b9..f177a6a69b 100644 --- a/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/064c7f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_064c7f() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl index 813eec3e68..b97cd2c3d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_068641() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl index cbcf84d5eb..c10c9cbb1f 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_068641() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl index cbcf84d5eb..c10c9cbb1f 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_068641() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl index 453b7beee9..5989871082 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl index 1d3f94f71e..9ad2a2414d 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_068641(texture3d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.spvasm index 7f48b8b07a..40498a94c5 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_068641 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_068641 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_068641 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_068641 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_068641 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_068641 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_068641 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl index 1e3ae926fc..5e4245b5ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/068641.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_068641() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl index 1c43f8d1fe..fbea4f3219 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_06e49c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl index 7ccdde8327..ad485a7041 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_06e49c() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl index 7ccdde8327..ad485a7041 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_06e49c() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl index 1c9a1ccaf5..5380fead81 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl index feafa4d762..ac1d739679 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_06e49c(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm index be0e588256..d9bd1c18ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_06e49c = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_06e49c +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_06e49c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_06e49c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_06e49c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_06e49c + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_06e49c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl index b9ddf2e599..382a2c775f 100644 --- a/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/06e49c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_06e49c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl index 6cc3fc739d..56705f963f 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_07548b() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl index 7b7e09f38f..a41e5c4476 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_07548b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl index 7b7e09f38f..a41e5c4476 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_07548b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl index 94e408b002..8196807bce 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl index a943c9d7e5..3547e96397 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_07548b(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm index 81c671543a..d700ee46eb 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_07548b = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_07548b +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_07548b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_07548b + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_07548b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_07548b + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_07548b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl index ddcfd7855e..d182a1cdf1 100644 --- a/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/07548b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_07548b() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl index 3899f39899..0d7bd6a4d8 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_0a1a79() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl index 872f4314df..9cb3c26302 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0a1a79() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl index 872f4314df..9cb3c26302 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0a1a79() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl index 7aacbb9a87..67dbe3772f 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl index 05cd137ccf..e912738ea3 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_0a1a79(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm index 2a4e58128a..2cd4c0cc89 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0a1a79 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_0a1a79 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_0a1a79 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0a1a79 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_0a1a79 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_0a1a79 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_0a1a79 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl index 0c98262fd8..d30c2deb97 100644 --- a/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0a1a79.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_0a1a79() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl index f94740e225..c77fc88484 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_0af6b5() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl index 388ae73302..ff91112f9e 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0af6b5() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl index 388ae73302..ff91112f9e 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0af6b5() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl index dc7474e882..ac6275c6e9 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl index dfe2b65849..14def46652 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_0af6b5(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.spvasm index 33b4e6a1e7..7a12a77205 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_0af6b5 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_0af6b5 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_0af6b5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_0af6b5 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_0af6b5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_0af6b5 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_0af6b5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl index d6371ca9d8..85bfa83abd 100644 --- a/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0af6b5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_0af6b5() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl index c2c0cd827e..6323dab484 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_0c3dff() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl index dcdd179da8..ef167e54f5 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0c3dff() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl index dcdd179da8..ef167e54f5 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0c3dff() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl index 4366f60a18..7ff9d58bad 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl index 64d849e1c7..99752dab80 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_0c3dff(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.spvasm index c8544d055f..241c800426 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0c3dff = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_0c3dff +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_0c3dff OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_0c3dff + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_0c3dff OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0c3dff + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_0c3dff OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl index 14d2872b65..58787ad4ed 100644 --- a/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0c3dff.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_0c3dff() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl index 65e450c5f3..1895c532ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_0cc825() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl index bf58d44d89..23f82c1460 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0cc825() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl index bf58d44d89..23f82c1460 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0cc825() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl index e22d8d7bd3..730ca7de6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl index 5f737ac6ba..3157ac447e 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_0cc825(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm index 1eeb64fcaf..d1d4490432 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0cc825 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_0cc825 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_0cc825 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0cc825 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_0cc825 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_0cc825 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_0cc825 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl index 9a44567b22..a7b6aeb9f2 100644 --- a/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/0cc825.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_0cc825() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl index 1bd0839446..5f8802371d 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_102722() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl index cf95c7c78a..e3a48f2569 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_102722() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl index cf95c7c78a..e3a48f2569 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_102722() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl index c4a5d5a5e8..f2c85aaec2 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_102722(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.spvasm index f1a4f4ff30..98830a80f2 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_102722 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_102722 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_102722 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_102722 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_102722 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_102722 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_102722 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl index dd665bfcac..7853e2573e 100644 --- a/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/102722.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_102722() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl index 439e2b7855..5e852dca6e 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_158cf0() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl index b9bb3f4baf..4a8c1e8ed7 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_158cf0() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl index b9bb3f4baf..4a8c1e8ed7 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_158cf0() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl index f8eb6ee0c9..7a7040bbde 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl index 8b8632425d..820b78d449 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_158cf0(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm index 57856cd9d4..e41ab4c72f 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_158cf0 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_158cf0 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_158cf0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_158cf0 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_158cf0 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_158cf0 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl index 0a13e2f367..49944b6036 100644 --- a/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/158cf0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_158cf0() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl index 9d5ba32935..b33955068b 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_1839f2() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl index d27947fa5c..198f00e191 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1839f2() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl index d27947fa5c..198f00e191 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1839f2() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl index 3d314fafb4..360dde1411 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl index f0251bac5b..669e5fc68a 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_1839f2(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm index c1f7242c28..c8d32a3698 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1839f2 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_1839f2 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_1839f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_1839f2 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_1839f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_1839f2 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_1839f2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl index 7da29d2eb0..971a7bbe8c 100644 --- a/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1839f2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_1839f2() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl index 3ee0b868e6..738285426e 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_1a7d35() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl index 1c3f6674c7..842544acb1 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1a7d35() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl index 1c3f6674c7..842544acb1 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1a7d35() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl index ca69181114..16992aa052 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl index c857308264..9cac7210e1 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_1a7d35(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm index cac9cad999..cea0b979d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1a7d35 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_1a7d35 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_1a7d35 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_1a7d35 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_1a7d35 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_1a7d35 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_1a7d35 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl index 83b8de35a6..c8483a6ec5 100644 --- a/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1a7d35.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_1a7d35() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl index b0103e8cc7..4ea9716744 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_1bbd08() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl index 21d658ecd8..bceaccf5db 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_1bbd08() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl index 21d658ecd8..bceaccf5db 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_1bbd08() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl index a26b65d8f6..7d04d1fe41 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl index c05a7e5254..81cad88e8f 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_1bbd08(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.spvasm index f1316a50d0..20e4438b4b 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_1bbd08 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_1bbd08 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_1bbd08 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_1bbd08 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_1bbd08 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_1bbd08 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_1bbd08 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl index b6aa3ff4c9..889b97a7bf 100644 --- a/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1bbd08.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_1bbd08() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl index cc58e9a56c..ee0cfd9633 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_1c02e7() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl index f4ad1a0ebc..6add803bbc 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1c02e7() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl index f4ad1a0ebc..6add803bbc 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1c02e7() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl index 8e9601c049..28735eafaa 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl index a17b971cc5..4229a337d2 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_1c02e7(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm index 320d4a939c..f70ea856a0 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1c02e7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_1c02e7 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_1c02e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_1c02e7 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_1c02e7 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_1c02e7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl index bc7cea276d..81cd3a7aa6 100644 --- a/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1c02e7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_1c02e7() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl index 5f1165a649..6817caa978 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_1dc954() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl index aa78a7d332..bc9dfae205 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_1dc954() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl index aa78a7d332..bc9dfae205 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_1dc954() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl index 94daa3bc60..780f957fd0 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_1dc954(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm index 399c07d370..9d7f78378c 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1dc954 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_1dc954 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_1dc954 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_1dc954 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_1dc954 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_1dc954 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_1dc954 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl index 6ea1f64b6c..09a51545e0 100644 --- a/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1dc954.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_1dc954() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl index ac0ac7b490..743981b55e 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_1e20f2() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl index 1c1d0a9068..37c57c2048 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1e20f2() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl index 1c1d0a9068..37c57c2048 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1e20f2() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl index 45ecb4492c..ff9ee4a218 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl index 85e74185bd..485e4e6bae 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_1e20f2(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm index 446cf04fad..9b00b86b48 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_1e20f2 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_1e20f2 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_1e20f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_1e20f2 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_1e20f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_1e20f2 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_1e20f2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl index 87626256b2..61a9732081 100644 --- a/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1e20f2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_1e20f2() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl index 5a8267a413..eb0ff77575 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_1f1ef8() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl index c38dfe8a9c..7dc2888bbf 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1f1ef8() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl index c38dfe8a9c..7dc2888bbf 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1f1ef8() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl index 72a9bec5cf..5ee4edb9fa 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl index b85f5e512e..d5170258e2 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_1f1ef8(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm index 6aff314e13..a92e0d4156 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1f1ef8 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_1f1ef8 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_1f1ef8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_1f1ef8 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_1f1ef8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_1f1ef8 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_1f1ef8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl index 1651670f91..10e652a38b 100644 --- a/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/1f1ef8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_1f1ef8() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl index 11c07722ac..409e57b4b2 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_207fdd() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl index 4078bc2037..8b06dea79e 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_207fdd() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl index 4078bc2037..8b06dea79e 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_207fdd() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl index b780a9516e..81a7915b44 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl index 9e3c0e8260..c050074110 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_207fdd(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm index 4c90dfcb83..2007bb466c 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_207fdd = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_207fdd +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_207fdd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_207fdd + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_207fdd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_207fdd + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_207fdd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl index 50d6dc51d1..7687fee3f6 100644 --- a/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/207fdd.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_207fdd() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl index 2f1f79b9b5..12fdc66c8a 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_22d955() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl index c998bd87fe..71480143bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22d955() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl index c998bd87fe..71480143bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22d955() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl index b904bcdfe5..f05be5e8cb 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl index 4bf37e188a..78e57e30ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_22d955(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm index ac3fcad62f..a87e0bcc72 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_22d955 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_22d955 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_22d955 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_22d955 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_22d955 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_22d955 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_22d955 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl index 6cdb5e7214..c7b43ee23e 100644 --- a/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22d955.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_22d955() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl index 415716eaab..d9c15d25b5 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_22f045() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl index ae1649c796..ea7f63e55a 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22f045() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl index ae1649c796..ea7f63e55a 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22f045() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl index 204ab9dec6..8443dcb31d 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl index f07f39f236..69dfed278e 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_22f045(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm index 69ce3d4836..2e7da5d168 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_22f045 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_22f045 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_22f045 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_22f045 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_22f045 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_22f045 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_22f045 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl index 688f6a40b8..2b2abf67fd 100644 --- a/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/22f045.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_22f045() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl index 09b48b1de0..6b799cf01e 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_2383fc() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl index 3e78178212..ba95459d96 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2383fc() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl index 3e78178212..ba95459d96 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2383fc() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl index 6691080239..1d4c29aebe 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl index b56a39a7a0..f521f184db 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_2383fc(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm index 4b7a731918..5de3a69ace 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2383fc = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2383fc +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2383fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_2383fc + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_2383fc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_2383fc + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_2383fc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl index 58bfd0132a..e0a6d6f474 100644 --- a/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2383fc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_2383fc() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl index a0c5fcb3c7..a9ce3e03b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_258ab0() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl index 60afdb8057..c07e9c5ce6 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_258ab0() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl index 60afdb8057..c07e9c5ce6 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_258ab0() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl index 8590cc9eb6..84b9c3511b 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl index 0a3abff8c7..c1acf06b37 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_258ab0(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm index 3333cbe0a9..2d466a60fe 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_258ab0 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_258ab0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_258ab0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_258ab0 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_258ab0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_258ab0 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_258ab0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl index 40d49971e7..c4d6c00895 100644 --- a/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/258ab0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_258ab0() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl index 8edb0aea0a..ad36c5393d 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_26bf70() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl index 7c666e2767..99c6d574b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_26bf70() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl index 7c666e2767..99c6d574b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_26bf70() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl index b3fe0dd686..5da5639ead 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl index 9b32850462..c2061787f2 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_26bf70(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.spvasm index 4040d99fe5..ff6c49d14c 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_26bf70 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_26bf70 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_26bf70 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_26bf70 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_26bf70 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_26bf70 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_26bf70 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl index 10aa757911..f17425abe7 100644 --- a/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/26bf70.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_26bf70() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl index ada88c15fd..16dcbf6713 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_2796b4() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl index 95522d93a2..dca2de1720 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_2796b4() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl index 95522d93a2..dca2de1720 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_2796b4() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl index 0fc2e68278..c60e59c97f 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_2796b4(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.spvasm index 1c76893b34..0325344f45 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,36 +39,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2796b4 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_2796b4 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_2796b4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2796b4 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2796b4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_2796b4 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_2796b4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl index 60ac36f593..f358f552ba 100644 --- a/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2796b4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_2796b4() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl index d8da3e5b03..19a48c3a0c 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_285218() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl index bdd814e6cf..d06be2b893 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_285218() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl index bdd814e6cf..d06be2b893 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_285218() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl index f55cc01f03..f7d44c3679 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_285218(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm index 72dc9e78b4..1443184221 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_285218 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_285218 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_285218 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_285218 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_285218 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_285218 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_285218 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl index b479a5bdb7..71a3111d4b 100644 --- a/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/285218.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_285218() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl index 1146908e40..51efb5813e 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_28a7ec() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl index 828727c669..476f0f9d5c 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_28a7ec() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl index 828727c669..476f0f9d5c 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_28a7ec() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl index 53936c45d4..cd0e4c2a5c 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl index 65d750445a..9b26b6b8d3 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_28a7ec(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm index 51ce8d907b..65dac0c4a0 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_28a7ec = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_28a7ec +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_28a7ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_28a7ec + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_28a7ec OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_28a7ec + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_28a7ec OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl index 01b44fa409..14ce9f841e 100644 --- a/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/28a7ec.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_28a7ec() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl index d69d314e8b..0fae6bbbaa 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2ac6c7() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl index a3e5a4c56c..c09574dc90 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ac6c7() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl index a3e5a4c56c..c09574dc90 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ac6c7() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl index dc2cb995d3..a975f3d9b9 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_2ac6c7(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.spvasm index 04401372ac..dc7dbdbd77 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_2ac6c7 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_2ac6c7 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_2ac6c7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2ac6c7 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_2ac6c7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2ac6c7 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2ac6c7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl index b48d70e900..8abb7ce83c 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ac6c7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_2ac6c7() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl index 3c0db21319..9bc1cb541b 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_2d2835() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl index ffe3cb5614..0920cc2a7f 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2d2835() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl index ffe3cb5614..0920cc2a7f 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2d2835() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl index 958833b12a..7b4f3eabcd 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_2d2835(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm index cf7024807d..5b7d6a737e 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,36 +39,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_2d2835 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_2d2835 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_2d2835 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2d2835 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_2d2835 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_2d2835 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_2d2835 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl index 2506162759..ce653b288b 100644 --- a/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2d2835.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_2d2835() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl index 3283fb98af..9b4969ac1b 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_2e6102() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl index 5f60ae7ccc..50a80ef301 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_2e6102() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl index 5f60ae7ccc..50a80ef301 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_2e6102() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl index 27673635ee..1b49822377 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl index 9bcd5aa8cc..e87697115a 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_2e6102(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm index 57c1ad10b0..1fb04e48ed 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_2e6102 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_2e6102 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_2e6102 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_2e6102 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_2e6102 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_2e6102 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_2e6102 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl index 7c3458e727..374522a97c 100644 --- a/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2e6102.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_2e6102() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl index 945cd4721d..cd857303c2 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2eb2a4() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl index 94f6628a51..5fece9590b 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2eb2a4() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl index 94f6628a51..5fece9590b 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2eb2a4() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl index 015e052c30..47ffde0100 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_2eb2a4(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.spvasm index 24d2ecd002..bef9eb9f1f 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2eb2a4 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_2eb2a4 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_2eb2a4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2eb2a4 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2eb2a4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_2eb2a4 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_2eb2a4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl index 089951d4f0..b7ff47bc3f 100644 --- a/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2eb2a4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_2eb2a4() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl index 89188ea8c0..2c3f2887e9 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2ed2a3() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl index 38a94e741b..2e462a4ad3 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ed2a3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl index 38a94e741b..2e462a4ad3 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ed2a3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl index e49cb9323f..04c9cda56e 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_2ed2a3(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.spvasm index d529e14c4a..b97d0adca1 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_2ed2a3 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_2ed2a3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_2ed2a3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2ed2a3 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_2ed2a3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2ed2a3 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2ed2a3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl index c974cc879f..599c72283a 100644 --- a/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/2ed2a3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_2ed2a3() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl index b4d61dcc96..70fa904e91 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_30b0b0() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl index 21e26cc278..2c4e933040 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_30b0b0() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl index 21e26cc278..2c4e933040 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_30b0b0() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl index 6e95a8b94b..894ec52919 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl index 540c35aee9..611742a249 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_30b0b0(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm index 4eef3b4b07..91e4a80348 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_30b0b0 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_30b0b0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_30b0b0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_30b0b0 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_30b0b0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_30b0b0 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_30b0b0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl index 158559f615..cf6003bceb 100644 --- a/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/30b0b0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_30b0b0() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl index 2cec898d13..c215a35bb1 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_31745b() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl index 6a31872a0c..6a2450fae2 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_31745b() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl index 6a31872a0c..6a2450fae2 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_31745b() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl index fab9cdc9ef..a051a4d2c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_31745b(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.spvasm index d401580157..9827d2d746 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,36 +39,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_31745b = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_31745b +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_31745b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_31745b + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_31745b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_31745b + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_31745b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl index 028068121b..0652c2688e 100644 --- a/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/31745b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_31745b() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl index 8b66228691..092d9bce08 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_32f368() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl index 6a94d6b85f..22811220fe 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_32f368() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl index 6a94d6b85f..22811220fe 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_32f368() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl index c2bf03813e..5c4305db55 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl index f60e099139..40ee25c848 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_32f368(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm index 0990ac00f6..26a37de128 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_32f368 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_32f368 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_32f368 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_32f368 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_32f368 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_32f368 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_32f368 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl index 160e1ff8c0..cb63ff92d5 100644 --- a/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/32f368.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_32f368() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl index fe8f3e7283..4135564330 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_330b7c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl index 8cf1f9464b..879a714fed 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_330b7c() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl index 8cf1f9464b..879a714fed 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_330b7c() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl index 1a37be2283..2fc62dc1ff 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl index e08e7b1b66..03f8eb30c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_330b7c(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm index 8142b42892..eb78ea6781 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_330b7c = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_330b7c +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_330b7c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_330b7c + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_330b7c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_330b7c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_330b7c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl index e93891fc5a..f44f87aeb9 100644 --- a/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/330b7c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_330b7c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl index 0db96c1d6b..40d5811e67 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_331aee() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl index 53f938c151..263c8a631d 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_331aee() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl index 53f938c151..263c8a631d 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_331aee() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl index 150214d2ff..0abfb907ac 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl index b79b25e9a7..14e276ef20 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_331aee(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.spvasm index e27f41a920..8b4e49e173 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_331aee = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_331aee +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_331aee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_331aee + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_331aee OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_331aee + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_331aee OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl index c56aa25c45..40a206b440 100644 --- a/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/331aee.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_331aee() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl index 4119114687..32257a31e5 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_33cec0() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl index 86c488bf77..08d323b15c 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_33cec0() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl index 86c488bf77..08d323b15c 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_33cec0() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl index 26fe35d0d7..82aa4fdc35 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl index 0f73a0cfa7..7a12c756fb 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_33cec0(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm index b62536b315..0a3d4cd7d7 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_33cec0 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_33cec0 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_33cec0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_33cec0 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_33cec0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_33cec0 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_33cec0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl index 5ee34feba6..b8abfcfc18 100644 --- a/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/33cec0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_33cec0() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl index f8299a67b5..f83d1fcc07 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_37ffd4() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl index 7bafb82573..56944646db 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_37ffd4() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl index 7bafb82573..56944646db 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_37ffd4() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl index 1c7cfb664b..f503dba68b 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl index 85bb75c929..ccd0fe7a6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_37ffd4(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm index b865d9c702..588fc63a79 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_37ffd4 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_37ffd4 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_37ffd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_37ffd4 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_37ffd4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_37ffd4 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_37ffd4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl index 1142990096..de7daec693 100644 --- a/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/37ffd4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_37ffd4() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl index a7bf0848c7..681e37c5ba 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_38e8d7() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl index 8c2dd24718..77ffb74cf5 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_38e8d7() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl index 8c2dd24718..77ffb74cf5 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_38e8d7() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl index d898f5edab..bc05eeac72 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl index ac1cd5a628..1609b522c9 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_38e8d7(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm index 5bf4b4a8c2..fad0694980 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_38e8d7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_38e8d7 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_38e8d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_38e8d7 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_38e8d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_38e8d7 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_38e8d7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl index 080c74fce1..c89dfae312 100644 --- a/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/38e8d7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_38e8d7() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl index 028ac8afa1..cb12161982 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_3a52ac() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl index b0fd8b1572..90738ecc22 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3a52ac() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl index b0fd8b1572..90738ecc22 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3a52ac() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl index 604ece29f6..3ff7e900b2 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl index b40ea4b89b..1c566a27d4 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_3a52ac(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm index 2208840680..c1f5cbcf13 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3a52ac = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_3a52ac +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_3a52ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_3a52ac - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_3a52ac OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_3a52ac + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl index 241766e406..7ff9b1e942 100644 --- a/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3a52ac.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_3a52ac() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl index 170257b8b2..febc992756 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_3bb7a1() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl index 879dea5d93..b8ad4cfead 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3bb7a1() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl index 879dea5d93..b8ad4cfead 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3bb7a1() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl index 52c2ee4f1e..e9030472bb 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl index 8cd1fce5b1..e00c212b07 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_3bb7a1(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm index 042c17d7e7..c506090590 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_3bb7a1 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_3bb7a1 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_3bb7a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3bb7a1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_3bb7a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_3bb7a1 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_3bb7a1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl index 0b7b71d8a8..941bf58d4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bb7a1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_3bb7a1() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl index e6050abbef..3db263880a 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_3bec15() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl index cc77637731..1ee37ac1de 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3bec15() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl index cc77637731..1ee37ac1de 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3bec15() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl index b08f7bbec9..9dbe6b03dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_3bec15(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.spvasm index 617f660309..44546d329b 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3bec15 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_3bec15 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_3bec15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3bec15 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_3bec15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_3bec15 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_3bec15 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl index 54a9a18c13..73d8e4b701 100644 --- a/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3bec15.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_3bec15() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl index 599a5aaf6e..2d6cdcaa3d 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_3c1937() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl index 3c35d23d3b..7de0dd0b61 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3c1937() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl index 3c35d23d3b..7de0dd0b61 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3c1937() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl index 66c76ccd11..670464d2e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_3c1937(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm index ceae29ae08..003ee5066c 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3c1937 = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl index b26afa22e3..7da0a5fd5d 100644 --- a/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3c1937.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_3c1937() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl index 9bddb8aa14..5e013cc96e 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_3d6f01() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl index 24d481d0ce..ed58795fae 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3d6f01() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl index 24d481d0ce..ed58795fae 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3d6f01() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl index 04287c4ee0..a6989b897d 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_3d6f01(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm index 658ccf1e99..45b0b4d41b 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -42,34 +42,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3d6f01 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_3d6f01 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_3d6f01 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3d6f01 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_3d6f01 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_3d6f01 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_3d6f01 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl index ec89f38a52..bc5feb5010 100644 --- a/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/3d6f01.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_3d6f01() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl index 83834818fb..7ea64ebadf 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_40c455() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl index a34c109992..181450ba64 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_40c455() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl index a34c109992..181450ba64 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_40c455() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl index cf380747ae..91e06cce9e 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl index aca14e6bdf..b90a54c204 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_40c455(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm index d6742e14d1..1990f956ce 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_40c455 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_40c455 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_40c455 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_40c455 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_40c455 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_40c455 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_40c455 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl index 17ec04a20a..9e144de2a2 100644 --- a/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/40c455.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_40c455() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl index 086f26898a..b54bc38f8f 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_4288fc() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl index 53c3ae0ff6..baac0458a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_4288fc() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl index 53c3ae0ff6..baac0458a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_4288fc() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl index 0d55884751..dcc4af3a92 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl index e865bdc019..7642d26798 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_4288fc(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm index 0251157803..2c8b573b5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_4288fc = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_4288fc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_4288fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_4288fc + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_4288fc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_4288fc + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_4288fc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl index 5a88ca4ca1..ed36fbe25f 100644 --- a/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4288fc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_4288fc() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl index a81a84bbf3..7f2af682fd 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_441ba8() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl index c2c79ae4d9..487e37a4ba 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_441ba8() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl index c2c79ae4d9..487e37a4ba 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_441ba8() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl index 5dfe9b5149..6c29a7ebd8 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl index 4d5772e40f..8135665f40 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_441ba8(texture3d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.spvasm index f90cc466db..3dc4d15340 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_441ba8 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_441ba8 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_441ba8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_441ba8 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_441ba8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_441ba8 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_441ba8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl index 6014c40901..e50241eb62 100644 --- a/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/441ba8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_441ba8() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl index 1cd12d9342..072c3f611c 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_44daa7() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl index 987f074577..c2c00904dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_44daa7() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl index 987f074577..c2c00904dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_44daa7() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl index a45332f421..b3d2ffdacd 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl index 65604afccc..c13854b8f0 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_44daa7(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm index 3a6ccca2cf..1096e90e51 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_44daa7 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_44daa7 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_44daa7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_44daa7 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_44daa7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_44daa7 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_44daa7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl index 1deb175d16..8e5eb43086 100644 --- a/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/44daa7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_44daa7() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl index e05a98c721..baeedc42ec 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_486500() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl index 5eb3313c12..6907fa76a8 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_486500() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl index 5eb3313c12..6907fa76a8 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_486500() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl index 88ef8d3307..071e1b7595 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl index 9007838331..4718b8db5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_486500(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm index da342166ef..f89fab7cc0 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_486500 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_486500 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_486500 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_486500 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_486500 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_486500 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_486500 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl index bbb5e94388..7008d69bdd 100644 --- a/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/486500.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_486500() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl index bb7e882643..3fad484466 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_4c454f() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl index 4ab4c3982d..8b72e1b8c5 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4c454f() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl index 4ab4c3982d..8b72e1b8c5 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4c454f() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl index f608d9c5e5..bf71b07034 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_4c454f(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm index 7d89bf659a..addc252a21 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,38 +40,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_4c454f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_4c454f +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_4c454f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_4c454f + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_4c454f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_4c454f + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_4c454f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl index 8b6083085a..77a6758ced 100644 --- a/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4c454f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_4c454f() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl index f239e4eae1..bde5c9588e 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_4d359d() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl index 39ad70a799..4c1b12c05f 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4d359d() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl index 39ad70a799..4c1b12c05f 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4d359d() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl index db817aff8a..b100b641f9 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_4d359d(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm index a218220958..7971519e3c 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,40 +39,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_4d359d = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_4d359d +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_4d359d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_4d359d + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_4d359d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_4d359d + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_4d359d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl index aeeef6a3da..1dd87755c8 100644 --- a/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4d359d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_4d359d() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl index d79d3d2075..14faea8e5d 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_4fc057() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl index d485fcca1d..2ae84daadc 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4fc057() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl index d485fcca1d..2ae84daadc 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4fc057() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl index 4853b57771..7e577e597b 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl index f3c66c8e2a..9c97891708 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_4fc057(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm index 22d3d466c3..f15b6dd1cf 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_4fc057 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_4fc057 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_4fc057 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_4fc057 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_4fc057 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_4fc057 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_4fc057 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl index bc8801144f..34cfaeb913 100644 --- a/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/4fc057.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_4fc057() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl index ffd82b273e..5ae5d4cc29 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_506a71() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl index 4d77b11d6f..cdf1190562 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_506a71() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl index 4d77b11d6f..cdf1190562 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_506a71() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl index f67d858d3d..73ff96713c 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_506a71(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm index 9315213c9f..64a7f820ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,36 +39,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_506a71 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_506a71 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_506a71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_506a71 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_506a71 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_506a71 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_506a71 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl index a37a117568..59d771df60 100644 --- a/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/506a71.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_506a71() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl index e8a74d2ed5..cdcebf9d63 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_52f503() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl index dc3e1b7bcd..d3308a56a2 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_52f503() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl index dc3e1b7bcd..d3308a56a2 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_52f503() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl index 3b9248f076..53ede68dd9 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl index 0930d2848c..73f8feea49 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_52f503(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm index cd373e8078..86ebd4caa8 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_52f503 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_52f503 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_52f503 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_52f503 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_52f503 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_52f503 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_52f503 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl index 61ad0ec18a..d273feedd1 100644 --- a/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/52f503.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_52f503() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl index 1a7d7ba0ac..4b376a5e28 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5841f8() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl index f8784c548c..386fd2fed4 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5841f8() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl index f8784c548c..386fd2fed4 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5841f8() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl index a1b2d3cf92..3bbe9a3cbd 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl index 691fffcf99..5a957638b5 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_5841f8(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm index 27b2fce534..2e43444b53 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_5841f8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_5841f8 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_5841f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_5841f8 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_5841f8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_5841f8 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_5841f8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl index 8881fcc536..f3aa2f514c 100644 --- a/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5841f8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5841f8() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl index 482beb0f74..f3eef94f86 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_59a0ab() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl index 1a0d898e05..994a8a03db 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_59a0ab() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl index 1a0d898e05..994a8a03db 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_59a0ab() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl index d89b2c76f0..a6864fd012 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl index b77b7dd48b..57fd487c2a 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_59a0ab(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm index d2ecfac6bc..37818bf4d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_59a0ab = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_59a0ab +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_59a0ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_59a0ab + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_59a0ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_59a0ab + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_59a0ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl index 2b2d44cb88..c2b7e2f117 100644 --- a/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/59a0ab.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_59a0ab() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl index cc7d1ac033..f45005de68 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_5a2f8f() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl index 7d0eb61fde..26c2342564 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_5a2f8f() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl index 7d0eb61fde..26c2342564 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_5a2f8f() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl index dde59b81dc..52905ad32f 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_5a2f8f(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm index 83dac174a2..4775beedb2 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5a2f8f = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl index 55a791e27d..c7b1590a83 100644 --- a/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5a2f8f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_5a2f8f() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl index 9b03422ec3..e6d8690bc3 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5bc4f3() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl index 729e6f7221..9e4fe3f6c6 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5bc4f3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl index 729e6f7221..9e4fe3f6c6 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5bc4f3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl index 9cb2ab3d57..1f9ae17dcd 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_5bc4f3(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm index 297fd445a8..5353efe147 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,38 +39,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5bc4f3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_5bc4f3 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_5bc4f3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_5bc4f3 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_5bc4f3 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_5bc4f3 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl index 840e0f3765..e3486d747d 100644 --- a/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5bc4f3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5bc4f3() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl index 9b84f6d56e..5dd56c6e2a 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5ddc61() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl index e916cf918d..1638ba0b87 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5ddc61() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl index e916cf918d..1638ba0b87 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5ddc61() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl index a94cc1ac8e..46377e4cba 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl index e8b62ee645..de567319de 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_5ddc61(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm index 68f61b972e..4b17a36073 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5ddc61 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_5ddc61 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_5ddc61 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_5ddc61 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_5ddc61 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_5ddc61 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_5ddc61 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl index de8f621c21..33304b9da8 100644 --- a/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5ddc61.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5ddc61() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl index cb02f5fee3..3353cbf9fd 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5f9a49() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl index da0820733f..fbcfe311b1 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5f9a49() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl index da0820733f..fbcfe311b1 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5f9a49() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl index 24392ad155..91a064286f 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl index f6b2d1b707..6e1295678b 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_5f9a49(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm index 7a64ab79ce..0fbfca7d3b 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_5f9a49 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_5f9a49 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_5f9a49 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_5f9a49 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_5f9a49 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_5f9a49 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_5f9a49 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl index 97187c8e0e..fb329f4d85 100644 --- a/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/5f9a49.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5f9a49() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl index ba90890df4..3a2737040a 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_602b5a() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl index 4f0db5516a..e18bdc56b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_602b5a() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl index 4f0db5516a..e18bdc56b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_602b5a() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl index c41e010331..f391359003 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_602b5a(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm index 93c189da07..84cabb670e 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -40,33 +40,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_602b5a = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_602b5a +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_602b5a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_602b5a + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_602b5a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_602b5a + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_602b5a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl index a7c2f31445..28692b5b85 100644 --- a/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/602b5a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_602b5a() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl index bbc6c4082c..57bbc65825 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_60975f() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl index ab19974898..1bd75dd47e 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_60975f() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl index ab19974898..1bd75dd47e 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_60975f() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl index acc1ecebde..9d806ca916 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl index bc1e09a691..d2473f0a2f 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_60975f(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm index fb1d69194d..710cc14106 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_60975f = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_60975f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_60975f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_60975f + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_60975f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_60975f + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_60975f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl index ac8ff9800f..ad81fa1295 100644 --- a/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/60975f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_60975f() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl index 92689e1405..f97502d7b6 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_658a74() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl index d3dcb5b6b7..51f28b3ad6 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_658a74() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl index d3dcb5b6b7..51f28b3ad6 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_658a74() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl index 0921ddc871..0a88f991f8 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_658a74(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm index 560733144f..146556e9f5 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,38 +39,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_658a74 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_658a74 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_658a74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_658a74 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_658a74 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_658a74 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_658a74 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl index 9c8cc3aebd..79d89b0ea5 100644 --- a/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/658a74.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_658a74() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl index 7920724569..90a24f3d73 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_682fd6() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl index b8d65ccc25..8d85e07b86 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_682fd6() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl index b8d65ccc25..8d85e07b86 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_682fd6() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl index 9fddf06672..5bb56240be 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_682fd6(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.spvasm index 420e450341..60b85532ce 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_682fd6 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_682fd6 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_682fd6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_682fd6 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_682fd6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_682fd6 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_682fd6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl index 15cae1d748..9b4623db0b 100644 --- a/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/682fd6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_682fd6() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl index 0b39052a96..f9d3b89149 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_699a1b() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl index f3d78c6c22..8b6de07dd4 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_699a1b() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl index f3d78c6c22..8b6de07dd4 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_699a1b() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl index 6b80b955ad..30ce8f95a2 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl index 4c739f82db..b564cde23c 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_699a1b(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm index b8f5015865..41ee6a7442 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_699a1b = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_699a1b +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_699a1b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_699a1b + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_699a1b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_699a1b + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_699a1b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl index 75854709df..7856f3d066 100644 --- a/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/699a1b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_699a1b() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl index 1c97c4cc60..36cf30c5f5 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_6b75c3() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl index df1c070909..fd7b01ff84 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b75c3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl index df1c070909..fd7b01ff84 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b75c3() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl index a92d69acdd..df1eb89d9a 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_6b75c3(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.spvasm index 1c3b2650c5..24633ee424 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_6b75c3 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_6b75c3 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_6b75c3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_6b75c3 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_6b75c3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_6b75c3 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_6b75c3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl index 6022b91f4f..1619daec94 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b75c3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_6b75c3() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl index bc36f22a08..01c953136f 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_6b80d2() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl index a2e5c731dd..cb4329dfbd 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b80d2() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl index a2e5c731dd..cb4329dfbd 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b80d2() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl index b73343e5d3..b93c6f821b 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_6b80d2(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm index f5112ee021..66cc308a53 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6b80d2 = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl index 7cd817fafb..a5b1793534 100644 --- a/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6b80d2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_6b80d2() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl index fe2006958b..a24470cb5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_6cff2e() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl index a9f96b4e79..e55171aa82 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_6cff2e() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl index a9f96b4e79..e55171aa82 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_6cff2e() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl index f4458c4cd8..7f428377ce 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl index 8a1d6102a0..ae8205a223 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_6cff2e(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.spvasm index 8e80a59ab0..782456e1e9 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6cff2e = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_6cff2e +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_6cff2e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_6cff2e + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_6cff2e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_6cff2e + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_6cff2e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl index bc09df811f..981078ba57 100644 --- a/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6cff2e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_6cff2e() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl index a50c0f3f6e..a517a3b1a2 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_6da692() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl index 69e93a9006..385f6ac906 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6da692() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl index 69e93a9006..385f6ac906 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6da692() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl index 81dc6f56a7..9b0531717a 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl index 49e92c6810..76512474b9 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_6da692(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm index d1101ca32c..47f56f5113 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6da692 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_6da692 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_6da692 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_6da692 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_6da692 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_6da692 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_6da692 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl index 0a1021c997..9a9c631f2a 100644 --- a/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6da692.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_6da692() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl index b909a03bac..5007c92d0b 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_6f8642() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl index 61a68cf7f6..a36060df77 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6f8642() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl index 61a68cf7f6..a36060df77 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6f8642() { - arg_0[uint3(0u, 0u, uint(1))] = (0u).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl index 9471f9b7af..e171c61223 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl index 233e519a29..1432b7b229 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_6f8642(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm index 2ce57c600d..1e32ffcf97 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6f8642 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_6f8642 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_6f8642 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_6f8642 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_6f8642 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_6f8642 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_6f8642 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl index 631e3c1313..b876de359e 100644 --- a/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/6f8642.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_6f8642() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl index ff91148611..7066bfdf34 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_726472() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl index 9c62e8457d..9c1e543dbf 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_726472() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl index 9c62e8457d..9c1e543dbf 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_726472() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl index f2fa086aba..32c1a37e8e 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_726472(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm index ead0f58c98..704d910dd7 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,34 +39,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_726472 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_726472 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_726472 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_726472 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_726472 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_726472 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_726472 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl index 87ae30cd38..b3d9d88d13 100644 --- a/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/726472.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_726472() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl index 93ebb93345..33cd067190 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_72fa64() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl index 86c2bf4c4c..08f8ef1fb7 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_72fa64() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl index 86c2bf4c4c..08f8ef1fb7 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_72fa64() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl index a9d5d54b3b..21ad721232 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_72fa64(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm index 4b421e0df2..cac18fd2e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,39 +40,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_72fa64 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_72fa64 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_72fa64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_72fa64 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_72fa64 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_72fa64 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_72fa64 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl index cb9be28405..690fc0aab0 100644 --- a/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/72fa64.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_72fa64() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl index feaede0471..b931dcd73f 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_731349() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl index c6837defba..7a9dbc7c23 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_731349() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl index c6837defba..7a9dbc7c23 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_731349() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl index 4d2e294a42..dbcd2e8c13 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl index 7d335e8646..119a556b6c 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_731349(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.spvasm index 8649d671f5..8bba6aadba 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_731349 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_731349 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_731349 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_731349 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_731349 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_731349 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_731349 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl index b659a87da6..db21ca0824 100644 --- a/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/731349.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_731349() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl index 5498680eba..38fcded599 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_73bbbc() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl index c0e09e48c4..c09389eebb 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_73bbbc() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl index c0e09e48c4..c09389eebb 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_73bbbc() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl index ea855e6b72..6f63069580 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl index 3c94e3d879..bb254bd98d 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_73bbbc(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm index 2f84672197..624ad7670f 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_73bbbc = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_73bbbc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_73bbbc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_73bbbc + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_73bbbc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_73bbbc + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_73bbbc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl index 9ad30382ef..9365f30720 100644 --- a/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/73bbbc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_73bbbc() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl index ddb281286a..a9c9a47cba 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_752da6() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl index f65a408b89..cc819765f3 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_752da6() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl index f65a408b89..cc819765f3 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_752da6() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl index 03ea3bb613..04635eb7f8 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl index 74e6cb2e5b..3c0fbb7164 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_752da6(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.spvasm index 35b57fb82c..ea0c305cc0 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_752da6 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_752da6 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_752da6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_752da6 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_752da6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_752da6 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_752da6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl index 9f4e06d7cd..c953b6957c 100644 --- a/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/752da6.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_752da6() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl index 464bf9d321..0d358c9aea 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_779d14() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl index 253eae20a2..1e23d253cb 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_779d14() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl index 253eae20a2..1e23d253cb 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_779d14() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl index 01199d0e82..2f3f36fe77 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl index 059346236e..b53b0707d1 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_779d14(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm index affc5ee08a..76d74c7b05 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_779d14 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_779d14 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_779d14 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_779d14 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_779d14 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_779d14 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl index baf07fd1eb..e6023762e4 100644 --- a/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/779d14.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_779d14() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl index 8cfde0260d..d3629f3ef7 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_77c0ae() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl index 31d53b3d1a..751517225f 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_77c0ae() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl index 31d53b3d1a..751517225f 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_77c0ae() { - arg_0[(0).xx] = (0u).xxxx; + arg_0[(1).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl index 34d7601173..087a5ea6e4 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - imageStore(arg_0, ivec2(0), uvec4(0u)); + imageStore(arg_0, ivec2(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl index b5866746b7..cbf7a2e970 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_77c0ae(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0))); + tint_symbol_1.write(uint4(1u), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.spvasm index 7af51d4509..40e4b5a5b1 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %21 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_77c0ae = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_77c0ae +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_77c0ae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_77c0ae + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_77c0ae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_77c0ae + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_77c0ae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl index ddc73be612..3a10e1e7c9 100644 --- a/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/77c0ae.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_77c0ae() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl index dd6f0c724b..685eb9f495 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_7bb211() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl index b1a3e77d0e..a9bc91a135 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7bb211() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl index b1a3e77d0e..a9bc91a135 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7bb211() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl index 54eca42716..60815c1c66 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_7bb211(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm index fde30d8190..faf3ec8b63 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,40 +39,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_7bb211 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_7bb211 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_7bb211 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_7bb211 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_7bb211 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_7bb211 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_7bb211 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl index 99a74405e5..1badce81f3 100644 --- a/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7bb211.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_7bb211() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl index c22261afe7..a3533ae0e1 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_7cec8d() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl index a1a4198cf9..76104fa0d5 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7cec8d() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl index a1a4198cf9..76104fa0d5 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7cec8d() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl index 0de30607a0..3846e41616 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl index 912d7c6124..235e6f5f8b 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_7cec8d(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm index 5ad44d24d8..572588ab5b 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_7cec8d = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_7cec8d +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_7cec8d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_7cec8d - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_7cec8d OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_7cec8d + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl index 1faa3416db..2b21dc1c9f 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cec8d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_7cec8d() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl index 72e6ebff58..a9004079cd 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_7cf6e7() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl index 59d0258334..75797799b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_7cf6e7() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl index 59d0258334..75797799b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_7cf6e7() { - arg_0[(0u).xx] = (0.0f).xxxx; + arg_0[(1u).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl index cfd83a1d0e..25d6a3cd4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - imageStore(arg_0, ivec2(uvec2(0u)), vec4(0.0f)); + imageStore(arg_0, ivec2(uvec2(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl index 91401076fb..e3638bc741 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_7cf6e7(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u))); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm index b2ba99cfa2..51603e94e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_7cf6e7 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_7cf6e7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_7cf6e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_7cf6e7 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_7cf6e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_7cf6e7 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_7cf6e7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl index 8a201a5f2e..2a975078f0 100644 --- a/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7cf6e7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_7cf6e7() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl index edc32c8a8b..984453f9a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_7f7fae() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl index 35b13ff28b..20e42ad021 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_7f7fae() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl index 35b13ff28b..20e42ad021 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_7f7fae() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl index 979f11c0bf..af3eb5db61 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_7f7fae(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.spvasm index d1ac58582c..33d5647429 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_7f7fae = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_7f7fae +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_7f7fae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_7f7fae + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_7f7fae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_7f7fae + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_7f7fae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl index 49ff2d8c70..c61ad6c8a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/7f7fae.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_7f7fae() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl index 0f067ae260..81e4032f89 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_804942() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl index 00b02cb6ca..0b2fa1a89b 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_804942() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl index 00b02cb6ca..0b2fa1a89b 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_804942() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl index 7dc0f6d951..658890489e 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl index f96343905c..e70c6794e5 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_804942(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.spvasm index dc2c2063fc..8c2d46bf2f 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_804942 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_804942 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_804942 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_804942 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_804942 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_804942 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_804942 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl index 06f7057e20..9b4303e40a 100644 --- a/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/804942.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_804942() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl index 6ae5db8e27..c71296c4e5 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_805dae() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl index 8abb6a896d..da9071f02b 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_805dae() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl index 8abb6a896d..da9071f02b 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_805dae() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl index 2265a73449..3a71c44e29 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl index 2dfb818f79..63a53546dc 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_805dae(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.spvasm index 55b1d44232..0e9c38e3b7 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_805dae = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_805dae +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_805dae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_805dae + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_805dae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_805dae + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_805dae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl index 7bc50679a5..33f56c0776 100644 --- a/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/805dae.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_805dae() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl index 4f8e6278d1..1876a3697d 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_83bcc1() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl index 4ca45eca05..7a4268fea9 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_83bcc1() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl index 4ca45eca05..7a4268fea9 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_83bcc1() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl index da45ded04d..09d5cffdf6 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_83bcc1(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.spvasm index 666ea1115b..14d69581c1 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -42,34 +42,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_83bcc1 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_83bcc1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_83bcc1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_83bcc1 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_83bcc1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_83bcc1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_83bcc1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl index 436eb3037a..68d5b9b272 100644 --- a/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/83bcc1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_83bcc1() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl index eb4d490c25..bb9020286c 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_872747() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl index abc0d22cfd..2291734ee8 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_872747() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl index abc0d22cfd..2291734ee8 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_872747() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl index 2c0461e1d7..a019adbab7 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_872747(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.spvasm index 844f37d136..d2782d1da5 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -40,33 +40,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_872747 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_872747 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_872747 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_872747 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_872747 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_872747 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_872747 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl index 61eaae0d33..e4ef2e3799 100644 --- a/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/872747.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_872747() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl index e60ce765df..e6e6f59245 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_8b9310() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl index 1f1d30e78c..a37807c105 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8b9310() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl index 1f1d30e78c..a37807c105 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8b9310() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl index 59512b574a..9cb69a4719 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl index 770d905171..3aa438ea49 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8b9310(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm index 65de91fe43..156cfba703 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_8b9310 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_8b9310 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8b9310 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_8b9310 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8b9310 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_8b9310 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_8b9310 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl index d0c0b532af..a889fbcd52 100644 --- a/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8b9310.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_8b9310() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl index d0da1e548f..fc964285b4 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_8bb287() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl index 418bf3dfa8..13c15d1b3e 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8bb287() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl index 418bf3dfa8..13c15d1b3e 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8bb287() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl index da9c76e6ce..88d82ad3bc 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl index 4421d40f5b..161933ad24 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8bb287(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm index e1b64d2e7e..e5cbdf94db 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8bb287 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_8bb287 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8bb287 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8bb287 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_8bb287 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_8bb287 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_8bb287 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl index 7719279e42..cb13b9461e 100644 --- a/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8bb287.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_8bb287() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl index acabd4f18a..4b54c88c51 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_8c76e9() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl index 26e5180b63..e02ac1dfef 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_8c76e9() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl index 26e5180b63..e02ac1dfef 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_8c76e9() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl index 9d8c1e24a6..bb42d24457 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8c76e9(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm index 14e31d5cb3..b5bcf8b06f 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8c76e9 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_8c76e9 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8c76e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_8c76e9 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8c76e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8c76e9 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_8c76e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl index ec93e21e5b..463506da0a 100644 --- a/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8c76e9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_8c76e9() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl index 528d387a53..0b2ba1e4c7 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_8dc54f() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl index 3ef51f2b12..aba561842f 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_8dc54f() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl index 3ef51f2b12..aba561842f 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_8dc54f() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl index 5fbcbfd868..9362b4cfd5 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl index 0f2343a31e..1e8931d2f3 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8dc54f(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm index 5431052cbd..fad4e33cdd 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8dc54f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_8dc54f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8dc54f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_8dc54f + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8dc54f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8dc54f + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_8dc54f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl index 0c6ac8717f..9e1854b96e 100644 --- a/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8dc54f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_8dc54f() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl index d2873c5bd2..b44640c4ad 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_8e0479() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl index e0b8d209ab..da6deffc82 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8e0479() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl index e0b8d209ab..da6deffc82 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8e0479() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl index e0ceb95f04..2627dfcb51 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - imageStore(arg_0, ivec3(0, 0, 1), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), 1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl index 3dcab98640..978ed3398d 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8e0479(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm index 000407df1c..9f289d76d0 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8e0479 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_8e0479 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8e0479 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8e0479 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_8e0479 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_8e0479 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_8e0479 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl index 17e9e38d81..af55e34ff5 100644 --- a/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8e0479.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_8e0479() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl index 99f57b3e8f..a480331181 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_8ed9f8() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl index bfb203d553..16243af9c0 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8ed9f8() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl index bfb203d553..16243af9c0 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8ed9f8() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl index 5a1fd666c4..09b9fdeb36 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl index 007a32d903..ab487c6124 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8ed9f8(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm index 78944bf88b..a9dbbc1e50 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_8ed9f8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_8ed9f8 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8ed9f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_8ed9f8 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_8ed9f8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_8ed9f8 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_8ed9f8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl index 8fed674ac0..ff44f4770c 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ed9f8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_8ed9f8() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl index 9424ac8d36..46e19fe459 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_8f71a1() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl index be336b8353..6f0611934f 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8f71a1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl index be336b8353..6f0611934f 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8f71a1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl index 42ace3de7f..6532b28b4a 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl index 0e8dc88b67..1e99a202bf 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8f71a1(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.spvasm index c903b5c451..ab44bfc8ab 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8f71a1 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_8f71a1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_8f71a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_8f71a1 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8f71a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_8f71a1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_8f71a1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl index 5ce5918b48..1a31821812 100644 --- a/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8f71a1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_8f71a1() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl index eca69e7484..67c5919fd6 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_8ff674() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl index 478e8571f7..c6cdd61ca1 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8ff674() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl index 478e8571f7..c6cdd61ca1 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8ff674() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl index dc5d86bd3f..f4e1a12985 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl index ae3354ec40..36217d2480 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_8ff674(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm index d97d70a747..af1a9025af 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8ff674 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_8ff674 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8ff674 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_8ff674 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_8ff674 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_8ff674 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_8ff674 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl index b313be4531..16987ba3c4 100644 --- a/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/8ff674.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_8ff674() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl index 2867992e31..975f7af8e5 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_958353() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl index 83268371bc..5f297ea1bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_958353() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl index 83268371bc..5f297ea1bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_958353() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl index 4116d9de42..fe84ee9cff 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_958353(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm index a0fd2d7ae9..44b3868b8f 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_958353 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_958353 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_958353 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_958353 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_958353 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_958353 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_958353 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl index f945b20411..6bb8ca5ab7 100644 --- a/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/958353.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_958353() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl index 27385b3b0e..7bd958b09d 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_959d94() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl index 0053ebc455..82bdc378d4 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_959d94() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl index 0053ebc455..82bdc378d4 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_959d94() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl index 3d498b4e38..07d78e2ada 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_959d94(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm index 071ba778f3..c724ae5a41 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_959d94 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_959d94 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_959d94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_959d94 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_959d94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_959d94 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_959d94 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl index 548a878ef6..afe005ce67 100644 --- a/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/959d94.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_959d94() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl index b98336cbc4..a75661c13f 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_95e452() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl index db2e297b70..503b09c4ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_95e452() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl index db2e297b70..503b09c4ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_95e452() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl index c17fdcbe46..989356b1ec 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl index 327ad008d7..ead888b8da 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_95e452(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm index 391ed7c227..ccb6e029bb 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_95e452 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_95e452 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_95e452 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_95e452 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_95e452 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_95e452 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_95e452 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl index 2f18a92c8b..0d427ebaaa 100644 --- a/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/95e452.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_95e452() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl index a51a043351..21dfadf7b5 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_969534() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl index 5d1107b86a..578cfd4405 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_969534() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl index 5d1107b86a..578cfd4405 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_969534() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl index c994c241da..24eabf8119 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_969534(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm index aab85aad47..aec627b76c 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_969534 = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl index d17bfa346e..19b6ea05e8 100644 --- a/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/969534.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_969534() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl index 6992b607ee..0441d2ee36 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_9938b7() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl index 1a75432903..ba535acd51 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9938b7() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl index 1a75432903..ba535acd51 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9938b7() { - arg_0[int3(0, 0, int(1u))] = (0).xxxx; + arg_0[int3((1).xx, int(1u))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl index e448b6896d..80153295f7 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - imageStore(arg_0, ivec3(0, 0, int(1u)), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl index 5e76a0387c..3ae47d1223 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_9938b7(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1u); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm index 265968a74c..021bbf282e 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,40 +38,44 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9938b7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %18 %24 %26 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_9938b7 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9938b7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_9938b7 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_9938b7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_9938b7 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_9938b7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl index ed0775f301..9c01171219 100644 --- a/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9938b7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9938b7() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl index d38ba032f3..82ddcfdebb 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_9a3ecc() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl index bf19cfeb5d..4b3d04160c 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_9a3ecc() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl index bf19cfeb5d..4b3d04160c 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_9a3ecc() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl index 3867d2a20a..5439a69dec 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl index e91a11afd8..46065b8a14 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_9a3ecc(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.spvasm index 6ca378548f..f380281549 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9a3ecc = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_9a3ecc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_9a3ecc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_9a3ecc + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9a3ecc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_9a3ecc + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_9a3ecc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl index 072ae7012d..bda3795c28 100644 --- a/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9a3ecc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_9a3ecc() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl index 805fbf2c2a..2151746ce7 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_9d8668() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl index 29f00cc178..5bba758112 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d8668() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl index 29f00cc178..5bba758112 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d8668() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl index bb433eea4a..b57014e387 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl index 83778bba45..e29a57178d 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_9d8668(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm index 7c36c4939c..5e76d8eedb 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_9d8668 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_9d8668 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9d8668 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_9d8668 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_9d8668 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_9d8668 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_9d8668 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl index 8f30157e54..7143481d2e 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d8668.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9d8668() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl index 689372f77d..b7ffc63518 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_9d9cd5() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl index 0f43b6b845..7672b6491b 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d9cd5() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl index 0f43b6b845..7672b6491b 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d9cd5() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl index 9c483a053c..ee29fa51a3 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - imageStore(arg_0, ivec3(0, 0, 1), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), 1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl index 946884618b..c22478bbd5 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_9d9cd5(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm index 3b2ba5880e..b83df321a6 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_9d9cd5 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_9d9cd5 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_9d9cd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_9d9cd5 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_9d9cd5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_9d9cd5 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_9d9cd5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl index e02d2ec99a..abf7d5a18c 100644 --- a/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9d9cd5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9d9cd5() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl index 12480b4ef6..426ca06fab 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_9e3ec5() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl index a1dff9c5d7..53f7cf20f4 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9e3ec5() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl index a1dff9c5d7..53f7cf20f4 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9e3ec5() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl index 292c9f6941..b78300429a 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl index 96998a48e6..c010dcedf0 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_9e3ec5(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.spvasm index 5293d47c8d..11456a7618 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9e3ec5 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_9e3ec5 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_9e3ec5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_9e3ec5 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9e3ec5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_9e3ec5 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_9e3ec5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl index b2822b3906..d7d82b458f 100644 --- a/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9e3ec5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_9e3ec5() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl index 57f9e41dbc..2a4613fd55 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_9f5318() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl index 5f0a2817c5..20545e4224 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9f5318() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl index 5f0a2817c5..20545e4224 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9f5318() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl index 71eab294df..ca32724bc9 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_9f5318(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm index e767dff30e..f835ad6069 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9f5318 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_9f5318 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_9f5318 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_9f5318 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_9f5318 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_9f5318 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_9f5318 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl index ba762dba78..0423d9092f 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f5318.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_9f5318() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl index a100c70316..5f1421ee57 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_9f7cea() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl index dfb1462f92..cde637f51f 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9f7cea() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl index dfb1462f92..cde637f51f 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9f7cea() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl index 4639026214..31ef353a80 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl index 6ebb568c16..fa5cafb09c 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_9f7cea(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm index 09b1bdd349..46c70efa05 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9f7cea = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_9f7cea +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_9f7cea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_9f7cea + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_9f7cea OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_9f7cea + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_9f7cea OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl index 2cfc03b2cd..5c720b7db8 100644 --- a/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/9f7cea.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9f7cea() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl index 8bc5822881..36452ea976 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_a0f96e() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl index eac237c8fe..7d90c8ffc0 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a0f96e() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl index eac237c8fe..7d90c8ffc0 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a0f96e() { - arg_0[uint3(0u, 0u, 1u)] = (0.0f).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl index 0d052c7caf..5b65139c90 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl index 55416ec8dc..ce17fe2a34 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_a0f96e(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm index be0bd697fa..17183b65bd 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,40 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_a0f96e = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_a0f96e +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_a0f96e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_a0f96e + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_a0f96e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_a0f96e + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_a0f96e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl index 4903cd3b63..3137e47624 100644 --- a/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a0f96e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a0f96e() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl index 1457ecff81..a52b22855e 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_a1352c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl index 852989a31d..b4c166db3b 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a1352c() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl index 852989a31d..b4c166db3b 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a1352c() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl index 69fba500e4..501d60ed7d 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl index e5aa80cf2b..3d3ba49b5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_a1352c(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm index 88ec22886e..b9dc68a331 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a1352c = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_a1352c +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_a1352c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_a1352c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_a1352c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_a1352c + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_a1352c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl index d4ae406601..b4f55b4b92 100644 --- a/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a1352c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a1352c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl index 90266ad023..f05d9779ce 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_a4c338() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl index 887d1a0951..ee3762eb64 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a4c338() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl index 887d1a0951..ee3762eb64 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a4c338() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl index be778b9084..519937c104 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_a4c338(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm index 700238c0cb..f5e8d49fed 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_a4c338 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_a4c338 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_a4c338 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_a4c338 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_a4c338 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_a4c338 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_a4c338 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl index 16909fdcef..240273323e 100644 --- a/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a4c338.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_a4c338() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl index d35de029f2..a433269513 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_a5e80d() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl index beae873f49..b49b2b22ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_a5e80d() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl index beae873f49..b49b2b22ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_a5e80d() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl index 0a280eede8..7bacb6ec1c 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - imageStore(arg_0, ivec3(uvec3(0u)), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl index b44bcec447..e62a4b4010 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_a5e80d(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm index 6710bee442..51445f9970 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_a5e80d = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_a5e80d +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_a5e80d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_a5e80d + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_a5e80d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_a5e80d + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_a5e80d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl index 523b068446..b73edc0a50 100644 --- a/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a5e80d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_a5e80d() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl index 8bbdda24b3..88d44270df 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_a6a986() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl index 7129e5938f..968e9e8815 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a6a986() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl index 7129e5938f..968e9e8815 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a6a986() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl index 0d9db4a4bd..f6bfd77bd8 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl index ecbe6c0a4f..a0fbb24cc2 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_a6a986(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm index 08a3859a83..8ca98d1d92 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_a6a986 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_a6a986 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_a6a986 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_a6a986 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_a6a986 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_a6a986 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_a6a986 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl index a07b3a2512..c3c9122188 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6a986.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a6a986() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl index 5ad97c0256..af252c6b6a 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_a6e78f() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl index 5c32fa33b7..0a6ae371a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a6e78f() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl index 5c32fa33b7..0a6ae371a7 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a6e78f() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl index f45f6f8658..6c096f884f 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_a6e78f(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm index d23507800c..2aa2d9f8d7 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a6e78f = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl index 38db884282..6ba26bdffa 100644 --- a/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a6e78f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_a6e78f() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl index 45ac5b06e9..2f4a3463ab 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_a9426c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl index 8faa545571..31cd280ec2 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a9426c() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl index 8faa545571..31cd280ec2 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a9426c() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl index f7d65f9979..18456eb28b 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl index f4bbdd4d27..a6335caa1d 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_a9426c(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm index 94396790fc..9d2d116a5a 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a9426c = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_a9426c +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_a9426c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_a9426c - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_a9426c OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_a9426c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl index 186d1fcf31..989163f68c 100644 --- a/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/a9426c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a9426c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl index 99c466df7b..50fe83b1f4 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ac67aa() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl index 94cd654873..e9ccad100b 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ac67aa() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl index 94cd654873..e9ccad100b 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ac67aa() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl index a72b97ca2a..1c5794d63c 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_ac67aa(texture3d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.spvasm index e18042cdc3..49759cd03d 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_ac67aa = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_ac67aa +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_ac67aa OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_ac67aa + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_ac67aa OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_ac67aa + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_ac67aa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl index c3095f6ba5..c7dabf6de4 100644 --- a/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ac67aa.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ac67aa() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl index 3eb9078deb..76ebe28820 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_aeb38a() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl index 207747fc34..ff6dc8587d 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_aeb38a() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl index 207747fc34..ff6dc8587d 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_aeb38a() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl index 64d71b79c7..41fe9491ae 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl index 816a29f597..e3850a7ee6 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_aeb38a(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm index 9823237a6e..7a929b4335 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_aeb38a = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_aeb38a +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_aeb38a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_aeb38a + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_aeb38a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_aeb38a + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_aeb38a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl index 97308956c3..da77ab2a5f 100644 --- a/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/aeb38a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_aeb38a() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl index 8de25c800f..48348e8656 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_b42fd3() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl index 2f7eb46e10..e520a5a8a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_b42fd3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl index 2f7eb46e10..e520a5a8a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_b42fd3() { - arg_0[uint3(0u, 0u, 1u)] = (0u).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl index 921ec9e81a..d76d7a51f2 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), uvec4(0u)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl index a88840975b..66bc913f75 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_b42fd3(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u)), 1u); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm index e550c49c8c..f08c969e85 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %22 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %24 = OpConstantNull %v4uint - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b42fd3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpCompositeConstruct %v3uint %23 %24 %uint_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_b42fd3 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_b42fd3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_b42fd3 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_b42fd3 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_b42fd3 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl index 70f8fdca5b..fc1889fd00 100644 --- a/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b42fd3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_b42fd3() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl index 2cc6a65952..b4b450d801 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_b706b1() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl index c479e1c702..06f2c5f738 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_b706b1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl index c479e1c702..06f2c5f738 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_b706b1() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl index 6e27e12b9a..272b927582 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl index 270213d33f..d4aaf4a1df 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_b706b1(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.spvasm index 659af469e2..9c0194d46e 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b706b1 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_b706b1 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_b706b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_b706b1 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_b706b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_b706b1 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_b706b1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl index 3c379e9ccb..28f1c41524 100644 --- a/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b706b1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_b706b1() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl index c04799d267..b4c02c62d4 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_b70ded() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl index 9fda40dfac..6613e710df 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b70ded() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl index 9fda40dfac..6613e710df 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b70ded() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl index 947fb4639d..4cf6aa4315 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_b70ded(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm index 4bef24b582..08e69b1479 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b70ded = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl index 59d6f6cba7..13327aa827 100644 --- a/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b70ded.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_b70ded() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl index f23a704080..d560e0fe90 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_b76ff3() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl index 2310856d92..a18fa2a3b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_b76ff3() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl index 2310856d92..a18fa2a3b3 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_b76ff3() { - arg_0[(0u).xx] = (0).xxxx; + arg_0[(1u).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl index 31af1612de..d3797b4775 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - imageStore(arg_0, ivec2(uvec2(0u)), ivec4(0)); + imageStore(arg_0, ivec2(uvec2(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl index 04029e755e..a9577d6d6c 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_b76ff3(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u))); + tint_symbol_1.write(int4(1), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm index 54f83ae99d..8458d84abb 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %21 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b76ff3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_b76ff3 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_b76ff3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_b76ff3 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_b76ff3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_b76ff3 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_b76ff3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl index 13c012cff9..eec1af1db1 100644 --- a/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b76ff3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_b76ff3() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl index 2503648a61..701e100a69 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_b77161() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl index 59dffc932d..0aa372c309 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b77161() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl index 59dffc932d..0aa372c309 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b77161() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl index 260b776d3c..794ce4a8a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_b77161(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm index 714b0c97f6..3addc3d56c 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.spvasm @@ -41,7 +41,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b77161 = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl index c32b6855df..202e528f68 100644 --- a/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/b77161.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_b77161() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl index 54740782f5..5729ba5f3a 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_bbcb7f() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl index 0278d0e7aa..427dbec3b2 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_bbcb7f() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl index 0278d0e7aa..427dbec3b2 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_bbcb7f() { - arg_0[(0).xx] = (0).xxxx; + arg_0[(1).xx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl index fbe98a8042..b6ba883499 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - imageStore(arg_0, ivec2(0), ivec4(0)); + imageStore(arg_0, ivec2(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl index 1d091aba00..835ba76009 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_bbcb7f(texture2d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0))); + tint_symbol_1.write(int4(1), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.spvasm index 7a21498e7b..23fa7480d6 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_bbcb7f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_bbcb7f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_bbcb7f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_bbcb7f + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_bbcb7f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_bbcb7f + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_bbcb7f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl index 3f241474b8..d168e2232d 100644 --- a/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bbcb7f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_bbcb7f() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl index 2ec8e59021..792576a466 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_be6e30() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl index 43f6c7e9de..8205b6a1cf 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_be6e30() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl index 43f6c7e9de..8205b6a1cf 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_be6e30() { - arg_0[(0).xx] = (0.0f).xxxx; + arg_0[(1).xx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl index 9df8efde49..b5fc1e6dbb 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - imageStore(arg_0, ivec2(0), vec4(0.0f)); + imageStore(arg_0, ivec2(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl index acb6216e9f..f2cc5a4c21 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_be6e30(texture2d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0))); + tint_symbol_1.write(float4(1.0f), uint2(int2(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.spvasm index 0a47c20c5e..9f4ba4694d 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %20 = OpConstantNull %v2int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_be6e30 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_be6e30 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_be6e30 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_be6e30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_be6e30 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_be6e30 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_be6e30 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl index cf77394b7f..8a927110ea 100644 --- a/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/be6e30.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_be6e30() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl index 2169dffe21..a3405b469b 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_bf775c() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl index 592886825b..6a7b2e0574 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_bf775c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl index 592886825b..6a7b2e0574 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_bf775c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl index 3d8210b9e0..4d6d5d99b8 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_bf775c(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm index 34825d5f45..7465b1f89f 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_bf775c = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl index 7e0e3fced2..028926cefc 100644 --- a/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/bf775c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_bf775c() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl index c3727f5dd1..2b11e1d804 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_c1f29e() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl index 8b2154aa3e..237f855d11 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_c1f29e() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl index 8b2154aa3e..237f855d11 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_c1f29e() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl index f99aee7124..d753b62729 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_c1f29e(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm index 5f99a79389..3c052e71c9 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_c1f29e = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_c1f29e +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_c1f29e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_c1f29e + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_c1f29e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_c1f29e + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_c1f29e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl index 0b929ae4bd..8a8f8bcb40 100644 --- a/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c1f29e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_c1f29e() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl index 32632992bf..851fa1ba3d 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_c2ca46() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl index f8e5aee161..ad4c44bed1 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c2ca46() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl index f8e5aee161..ad4c44bed1 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c2ca46() { - arg_0[uint3(0u, 0u, 1u)] = (0).xxxx; + arg_0[uint3((1u).xx, 1u)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl index 2155bb1a8b..6be181b793 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, 1u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), 1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl index 43cef9a5f2..437604c898 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_c2ca46(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1u); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm index 3e8f1001d6..21a9c28ab9 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,38 +39,42 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 %uint_1 = OpConstant %uint 1 - %23 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %25 = OpConstantNull %v4int - %26 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_c2ca46 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpCompositeConstruct %v3uint %24 %25 %uint_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_c2ca46 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_c2ca46 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_c2ca46 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_c2ca46 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_c2ca46 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_c2ca46 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl index 2598ef9492..a6a5957a05 100644 --- a/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c2ca46.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_c2ca46() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1u), 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl index ad57368cda..2fd65bd627 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_c32905() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl index 8bb2be1a61..86085c48df 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c32905() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl index 8bb2be1a61..86085c48df 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c32905() { - arg_0[uint3(0u, 0u, uint(1))] = (0).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl index 1992aea2dc..22d00c601b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl index 5365b9da83..e1567402b5 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_c32905(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(uint2(0u)), 1); + tint_symbol_1.write(int4(1), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm index 81e223f76a..9f673bc427 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v2uint %uint_1 %uint_1 %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_c32905 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %uint %23 0 + %25 = OpCompositeExtract %uint %23 1 + %26 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_c32905 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_c32905 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_c32905 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_c32905 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_c32905 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_c32905 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl index 1f6274462c..fac082111e 100644 --- a/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c32905.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_c32905() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl index bee0ccf65a..5eb1877fb4 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_c5af1e() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl index ba59f437ed..2d35b3f40f 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_c5af1e() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl index ba59f437ed..2d35b3f40f 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_c5af1e() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl index 7e8006da67..98e6513b71 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl index 5421957218..783a4917f7 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_c5af1e(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.spvasm index 415c2a82f1..7e951952d5 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_c5af1e = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_c5af1e +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_c5af1e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_c5af1e + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_c5af1e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_c5af1e + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_c5af1e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl index 003aee25c3..311449a6c7 100644 --- a/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c5af1e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_c5af1e() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl index 32ab3087b1..52c9c3ab6d 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_c863be() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl index e6948caad6..d9045bb47b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c863be() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl index e6948caad6..d9045bb47b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c863be() { - arg_0[int3(0, 0, 1)] = (0.0f).xxxx; + arg_0[int3((1).xx, 1)] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl index bbe2282da9..12951ee9ce 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_c863be(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm index 711b604997..dd01bb31da 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 41 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,36 +39,40 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 - %23 = OpTypeFunction %v4float + %22 = OpConstantComposite %v2int %int_1 %int_1 %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %28 = OpTypeFunction %v4float %textureStore_c863be = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %22 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %17 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_c863be +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_c863be OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_c863be + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_c863be OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_c863be + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_c863be OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl index 627c0cac56..e81dd25b9b 100644 --- a/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/c863be.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_c863be() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl index fcca5517ea..6b297ebecb 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_cb3b0b() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl index 643e0535cd..f1e23140e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_cb3b0b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl index 643e0535cd..f1e23140e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_cb3b0b() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl index 7d048d22b1..295aab045e 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl index 070eb532d9..7883aab8c0 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_cb3b0b(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm index 8220c1d644..167bfdca64 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_cb3b0b = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_cb3b0b +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_cb3b0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_cb3b0b + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_cb3b0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_cb3b0b + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_cb3b0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl index 4d7d2c0fe2..11741a424a 100644 --- a/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/cb3b0b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_cb3b0b() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl index aff8c5ca59..d81dc9f31e 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_d26166() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl index f98702f536..11e8bfaafa 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d26166() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl index f98702f536..11e8bfaafa 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d26166() { - arg_0[1u] = (0u).xxxx; + arg_0[1u] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl index ea57840b91..6888a47aae 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_d26166(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1u)); + tint_symbol_1.write(uint4(1u), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm index b619746b5d..c34f3752ce 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.spvasm @@ -40,7 +40,7 @@ %13 = OpTypeFunction %void %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %21 = OpConstantNull %v4uint + %21 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d26166 = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl index 9ae6acffbf..db59747f05 100644 --- a/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d26166.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_d26166() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl index 4477682454..bfeba0d0f3 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_d55e65() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl index 2da0b0d1b1..0b27d0cc4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_d55e65() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl index 2da0b0d1b1..0b27d0cc4c 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_d55e65() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl index a13f03515b..9ace9541fd 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - imageStore(arg_0, ivec3(uvec3(0u, 0u, uint(1))), vec4(0.0f)); + imageStore(arg_0, ivec3(uvec3(uvec2(1u), uint(1))), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl index 2ba46c31fe..6b43ae2c84 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_d55e65(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm index 6a858f41db..5a162fba11 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_d55e65 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_d55e65 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_d55e65 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_d55e65 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_d55e65 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_d55e65 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_d55e65 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl index 75e91b5e48..47857932d0 100644 --- a/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d55e65.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_d55e65() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl index 94fa33efbb..ab49aa8486 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_d73b5c() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl index 85e4777a84..1fcecc89d6 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d73b5c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl index 85e4777a84..1fcecc89d6 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d73b5c() { - arg_0[1] = (0).xxxx; + arg_0[1] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl index c564d6d96b..5f80189585 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_d73b5c(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1)); + tint_symbol_1.write(int4(1), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm index b2c5b3ae3c..344da4c430 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.spvasm @@ -41,7 +41,7 @@ %13 = OpTypeFunction %void %int_1 = OpConstant %int 1 %v4int = OpTypeVector %int 4 - %21 = OpConstantNull %v4int + %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %22 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d73b5c = OpFunction %void None %13 diff --git a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl index 24581f76e8..929882d236 100644 --- a/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d73b5c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_d73b5c() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl index 0430ac6025..7988b6a088 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_d82b0a() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl index 9eb672e608..f31d34a66b 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_d82b0a() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl index 9eb672e608..f31d34a66b 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_d82b0a() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl index 283430c01e..37ecb79667 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_d82b0a(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm index 78fb6b6e8c..ead28bfb41 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,36 +40,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d82b0a = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_d82b0a +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_d82b0a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_d82b0a + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_d82b0a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_d82b0a + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_d82b0a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl index 840ebef539..0c4c779227 100644 --- a/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/d82b0a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_d82b0a() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl index a285481e51..2d38fb3395 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_db92a2() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl index 0cc9f6f923..0ecc939f2e 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_db92a2() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl index 0cc9f6f923..0ecc939f2e 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_db92a2() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl index 67c6b85e59..ce1044e7a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl index 1e319a7fd3..a099a418f4 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_db92a2(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm index e708f64878..d95aecd208 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_db92a2 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_db92a2 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_db92a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_db92a2 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_db92a2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_db92a2 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_db92a2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl index 3d6717e457..c9152d1afc 100644 --- a/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/db92a2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_db92a2() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl index b974b11b68..522cf94a2a 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_dd7d81() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl index 598b8116c3..7db12207a5 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_dd7d81() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl index 598b8116c3..7db12207a5 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_dd7d81() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl index 8106b7744a..82932b7db9 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl index 15ec0e76af..8b7e58d8aa 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_dd7d81(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.spvasm index 205afddb63..0ca8cbee1e 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_dd7d81 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_dd7d81 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_dd7d81 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_dd7d81 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_dd7d81 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_dd7d81 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_dd7d81 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl index 4c1f5293ad..652c180ee1 100644 --- a/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dd7d81.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_dd7d81() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl index 65fa8b518e..fcae4f7a63 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_dde364() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl index c35dda32b2..377f6a7fac 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dde364() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl index c35dda32b2..377f6a7fac 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dde364() { - arg_0[int3(0, 0, 1)] = (0u).xxxx; + arg_0[int3((1).xx, 1)] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl index 45be7606f0..fbffd16a0b 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_dde364(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm index 02a970988d..6f489657c8 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,38 +40,42 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %23 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %25 = OpConstantNull %v4uint - %26 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_dde364 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %23 %25 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpCompositeConstruct %v3int %24 %25 %int_1 + OpImageWrite %18 %26 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %26 - %28 = OpLabel - %29 = OpFunctionCall %void %textureStore_dde364 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_dde364 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %31 = OpLabel - %32 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %32 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_dde364 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_dde364 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_dde364 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_dde364 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl index 22cf9bbb7c..0ba15eaa3c 100644 --- a/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dde364.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_dde364() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl index 77739a0280..40f235e810 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_de4b94() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl index e83000062b..4242e4af5b 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_de4b94() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl index e83000062b..4242e4af5b 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_de4b94() { - arg_0[1u] = (0).xxxx; + arg_0[1u] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl index 8402154f95..3d16bb91ed 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_de4b94(texture1d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint(1u)); + tint_symbol_1.write(int4(1), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm index b5ffea90f5..d9fd4d1879 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_de4b94 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %uint_1 %22 + OpImageWrite %18 %uint_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_de4b94 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_de4b94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_de4b94 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_de4b94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_de4b94 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_de4b94 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl index bdd4cadc5f..154031e564 100644 --- a/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/de4b94.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_de4b94() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl index 437f7f22e3..aa0c6bd4ca 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_df2ca4() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl index baf4f2f298..f7b8f08b16 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_df2ca4() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl index baf4f2f298..f7b8f08b16 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_df2ca4() { - arg_0[int3(0, 0, int(1u))] = (0.0f).xxxx; + arg_0[int3((1).xx, int(1u))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl index eea8131a2b..c0a6eb1a28 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - imageStore(arg_0, ivec3(0, 0, int(1u)), vec4(0.0f)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl index 00b2bb9ea8..d837be8a7d 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_df2ca4(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(int2(0)), 1u); + tint_symbol_1.write(float4(1.0f), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm index 401fcfbdc0..2bb379f8bf 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,43 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_df2ca4 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_df2ca4 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_df2ca4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_df2ca4 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_df2ca4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_df2ca4 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_df2ca4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl index a70a6fa527..5b7143b78c 100644 --- a/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/df2ca4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_df2ca4() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl index 5f998f9d5b..d84183fb5d 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_dfa9a1() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl index 2e48f79442..28cbdd2bed 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dfa9a1() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl index 2e48f79442..28cbdd2bed 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dfa9a1() { - arg_0[uint3(0u, 0u, uint(1))] = (0.0f).xxxx; + arg_0[uint3((1u).xx, uint(1))] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl index 22747d5b7e..27d7aad51b 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_dfa9a1(texture2d_array tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint2(uint2(0u)), 1); + tint_symbol_1.write(float4(1.0f), uint2(uint2(1u)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm index 1ab8b71c18..891738386c 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,38 +39,43 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %uint_0 = OpConstant %uint 0 + %v2uint = OpTypeVector %uint 2 + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v2uint %uint_1 %uint_1 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %25 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %30 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %31 = OpTypeFunction %v4float %textureStore_dfa9a1 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - %21 = OpBitcast %uint %int_1 - %24 = OpCompositeConstruct %v3uint %uint_0 %uint_0 %21 - OpImageWrite %17 %24 %5 + %23 = OpCompositeExtract %uint %22 0 + %24 = OpCompositeExtract %uint %22 1 + %25 = OpBitcast %uint %int_1 + %28 = OpCompositeConstruct %v3uint %23 %24 %25 + OpImageWrite %17 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_dfa9a1 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_dfa9a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_dfa9a1 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_dfa9a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %void %textureStore_dfa9a1 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_dfa9a1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl index a930131934..0c3ebaa20d 100644 --- a/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dfa9a1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_dfa9a1() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1u), 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl index 962168263c..abc13b1001 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_dffb13() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl index 84db8e5536..6bf3dd3a51 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dffb13() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl index 84db8e5536..6bf3dd3a51 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dffb13() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl index 65218a97df..212a8bc966 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_dffb13(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm index 8df8e48112..a8676cab34 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -40,39 +40,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_dffb13 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_dffb13 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_dffb13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_dffb13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_dffb13 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_dffb13 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_dffb13 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl index b7fb947524..e1cdbc5ed0 100644 --- a/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/dffb13.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_dffb13() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl index b7e07e0a8c..9c47a304dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_e7c6d8() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl index 87e9182cdf..42109ccbb9 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e7c6d8() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl index 87e9182cdf..42109ccbb9 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e7c6d8() { - arg_0[1u] = (0.0f).xxxx; + arg_0[1u] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl index 85510ef0dc..d38883f1f7 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_e7c6d8(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1u)); + tint_symbol_1.write(float4(1.0f), uint(1u)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm index e9be8b7da4..fae0eedb8f 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_e7c6d8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %uint_1 %5 + OpImageWrite %17 %uint_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_e7c6d8 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_e7c6d8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_e7c6d8 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_e7c6d8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_e7c6d8 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_e7c6d8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl index 3e171510e3..0ba10b3573 100644 --- a/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e7c6d8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_e7c6d8() { - textureStore(arg_0, 1u, vec4()); + textureStore(arg_0, 1u, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl index 68ab40b234..293ba3cef0 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_e885e8() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl index 0faa237daa..59304c4ddc 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e885e8() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl index 0faa237daa..59304c4ddc 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e885e8() { - arg_0[1] = (0.0f).xxxx; + arg_0[1] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl index 3bea09b6ed..0c4ce647dd 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_e885e8(texture1d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint(1)); + tint_symbol_1.write(float4(1.0f), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.spvasm index 4e0f0a351d..d4c6bf73ee 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -39,33 +39,34 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 - %20 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %22 = OpTypeFunction %v4float %textureStore_e885e8 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %int_1 %5 + OpImageWrite %17 %int_1 %21 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %20 - %22 = OpLabel - %23 = OpFunctionCall %void %textureStore_e885e8 +%vertex_main_inner = OpFunction %v4float None %22 + %24 = OpLabel + %25 = OpFunctionCall %void %textureStore_e885e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %25 = OpLabel - %26 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %26 + %27 = OpLabel + %28 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %28 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_e885e8 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_e885e8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_e885e8 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_e885e8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl index 4cc3fb9503..bcfb579eb2 100644 --- a/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e885e8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_e885e8() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl index 8d6a6aa367..c6af8b87a3 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_e8cbf7() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl index c5cfb67add..1ee115efba 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_e8cbf7() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl index c5cfb67add..1ee115efba 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_e8cbf7() { - arg_0[(0u).xx] = (0u).xxxx; + arg_0[(1u).xx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl index 2b6995dbb3..076296d719 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - imageStore(arg_0, ivec2(uvec2(0u)), uvec4(0u)); + imageStore(arg_0, ivec2(uvec2(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl index e263440e10..dcc460bd33 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_e8cbf7(texture2d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(uint2(0u))); + tint_symbol_1.write(uint4(1u), uint2(uint2(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm index 38ad68a3db..1ae9ed82a8 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %20 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v2uint %uint_1 %uint_1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_e8cbf7 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_e8cbf7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_e8cbf7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_e8cbf7 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_e8cbf7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_e8cbf7 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_e8cbf7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl index 33cb1d3a97..48c3fd09e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/e8cbf7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_e8cbf7() { - textureStore(arg_0, vec2(), vec4()); + textureStore(arg_0, vec2(1u), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl index 35292f6824..93b133c83b 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_eb702f() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl index 5bc0b80030..fc003fc7b7 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb702f() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl index 5bc0b80030..fc003fc7b7 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb702f() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl index dbf804546e..939999edbf 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - imageStore(arg_0, ivec3(0), vec4(0.0f)); + imageStore(arg_0, ivec3(1), vec4(1.0f)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl index bac111e1e3..56021c475d 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_eb702f(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.spvasm index 8e0f51ae0e..fbb6f18640 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,34 +38,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_eb702f = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_eb702f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_eb702f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_eb702f + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_eb702f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_eb702f + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_eb702f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl index 0e86ad2615..449e726f5d 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb702f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_eb702f() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl index 4393ba03d6..8f44b9f0c1 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_eb78b9() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl index 67a03a226b..04cd8ac89e 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb78b9() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl index 67a03a226b..04cd8ac89e 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb78b9() { - arg_0[(0).xxx] = (0).xxxx; + arg_0[(1).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl index ff3eaea9c1..fae6231a2f 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - imageStore(arg_0, ivec3(0), ivec4(0)); + imageStore(arg_0, ivec3(1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl index 038f1f45e5..3d0f17b064 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_eb78b9(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(int3(0))); + tint_symbol_1.write(int4(1), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.spvasm index fd0eaa0d55..a257eea0c7 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,36 +38,37 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int - %23 = OpTypeFunction %v4float + %23 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_eb78b9 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %20 %22 + OpImageWrite %18 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_eb78b9 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_eb78b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_eb78b9 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_eb78b9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_eb78b9 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_eb78b9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl index c200bb2954..0b3dd17efc 100644 --- a/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/eb78b9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_eb78b9() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl index 9e299d19dd..a238c3a3df 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ee6acc() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl index 8193759670..8d61677a0f 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ee6acc() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl index 8193759670..8d61677a0f 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ee6acc() { - arg_0[(0).xxx] = (0.0f).xxxx; + arg_0[(1).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl index 46568a969f..2349a9e03d 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_ee6acc(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(int3(0))); + tint_symbol_1.write(float4(1.0f), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.spvasm index 3a82903384..98e9265f82 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,34 +39,36 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %20 = OpConstantNull %v3int - %21 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_ee6acc = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_ee6acc +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_ee6acc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_ee6acc + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_ee6acc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_ee6acc + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_ee6acc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl index 377310e4b5..0bfb99b6d6 100644 --- a/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ee6acc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ee6acc() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl index 83185c7dd0..c5f3264dcc 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ef9f2f() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl index fb51122e9e..0dd0e1c70b 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ef9f2f() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl index fb51122e9e..0dd0e1c70b 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ef9f2f() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl index 5a8142a037..fddab8307e 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl index a9ba91d14b..1b3e79ce16 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_ef9f2f(texture3d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.spvasm index 13986420b4..df69de9942 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_ef9f2f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_ef9f2f +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_ef9f2f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_ef9f2f + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_ef9f2f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_ef9f2f + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_ef9f2f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl index 9a0b5cb95b..913ab9ed00 100644 --- a/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/ef9f2f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ef9f2f() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl index e73dc3e8cd..d3424589ff 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_f1e6d3() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl index b02d3108a9..e660717f2d 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f1e6d3() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl index b02d3108a9..e660717f2d 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f1e6d3() { - arg_0[(0u).xxx] = (0).xxxx; + arg_0[(1u).xxx] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl index ba30681c6e..7c4ec44627 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - imageStore(arg_0, ivec3(uvec3(0u)), ivec4(0)); + imageStore(arg_0, ivec3(uvec3(1u)), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl index 06ddbc16db..7bdf79dd06 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_f1e6d3(texture3d tint_symbol_1) { - tint_symbol_1.write(int4(0), uint3(uint3(0u))); + tint_symbol_1.write(int4(1), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm index 3b45b31f15..d7b74d18f9 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %21 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %22 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int - %24 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %25 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_f1e6d3 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_f1e6d3 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_f1e6d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_f1e6d3 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_f1e6d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_f1e6d3 + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_f1e6d3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl index a68c2ecf57..2906295093 100644 --- a/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f1e6d3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_f1e6d3() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl index 431978daab..5ed24d4afe 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_f8dead() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl index 660c7b48c8..3e79f4c0b0 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f8dead() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.fxc.hlsl index 660c7b48c8..3e79f4c0b0 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f8dead() { - arg_0[(0).xxx] = (0u).xxxx; + arg_0[(1).xxx] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.glsl index a71f30414b..ef22abd381 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8ui) uniform highp writeonly uimage3D arg_0; void textureStore_f8dead() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage3D arg_0; void textureStore_f8dead() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage3D arg_0; void textureStore_f8dead() { - imageStore(arg_0, ivec3(0), uvec4(0u)); + imageStore(arg_0, ivec3(1), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.msl index 7e0be797cb..014cb5d938 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_f8dead(texture3d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint3(int3(0))); + tint_symbol_1.write(uint4(1u), uint3(int3(1))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.spvasm index 9ac9d9f942..a38ca1ce81 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 40 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,36 +39,38 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %21 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %22 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint - %24 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %25 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %26 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_f8dead = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %21 %23 + OpImageWrite %18 %22 %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %textureStore_f8dead +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %textureStore_f8dead OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_f8dead + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_f8dead OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_f8dead + %38 = OpLabel + %39 = OpFunctionCall %void %textureStore_f8dead OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.wgsl index 450fd25478..e2d9e608e7 100644 --- a/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f8dead.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_f8dead() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1i), vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl index d8343c19d5..47a44c9c12 100644 --- a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_f9be83() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.dxc.hlsl index a323f52245..d4d5fcec3c 100644 --- a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_f9be83() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.fxc.hlsl index a323f52245..d4d5fcec3c 100644 --- a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_f9be83() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.msl index 8eb8d23ef6..445e9a91e8 100644 --- a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_f9be83(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.spvasm index 525247cdf6..c43c393d02 100644 --- a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,38 +39,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_f9be83 = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_f9be83 +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_f9be83 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_f9be83 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_f9be83 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_f9be83 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.wgsl index 56835dddaf..87523330d7 100644 --- a/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/f9be83.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_f9be83() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl index 37421d87b4..b26baa2bf5 100644 --- a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_fb9a8f() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.dxc.hlsl index 6af6c919d0..97e7a83217 100644 --- a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_fb9a8f() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.fxc.hlsl index 6af6c919d0..97e7a83217 100644 --- a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_fb9a8f() { - arg_0[1] = (0u).xxxx; + arg_0[1] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.msl index f2e593c171..6f57faf9ab 100644 --- a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_fb9a8f(texture1d tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint(1)); + tint_symbol_1.write(uint4(1u), uint(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.spvasm index 9a0f94786b..15c1562cf1 100644 --- a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -41,34 +41,35 @@ %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint - %23 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %23 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %24 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_fb9a8f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %int_1 %22 + OpImageWrite %18 %int_1 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %textureStore_fb9a8f +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_fb9a8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_fb9a8f + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_fb9a8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %void %textureStore_fb9a8f + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_fb9a8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.wgsl index 2e22223d5e..43d1b31abf 100644 --- a/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fb9a8f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_1d; fn textureStore_fb9a8f() { - textureStore(arg_0, 1i, vec4()); + textureStore(arg_0, 1i, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl index 5b66de864d..dbb8a6b38f 100644 --- a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_fbf53f() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.dxc.hlsl index e274d9ed22..aa3530de90 100644 --- a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fbf53f() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.fxc.hlsl index e274d9ed22..aa3530de90 100644 --- a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fbf53f() { - arg_0[int3(0, 0, 1)] = (0).xxxx; + arg_0[int3((1).xx, 1)] = (1).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.glsl index de6cafacc2..c78030e1a5 100644 --- a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_fbf53f() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_fbf53f() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_fbf53f() { - imageStore(arg_0, ivec3(0, 0, 1), ivec4(0)); + imageStore(arg_0, ivec3(ivec2(1), 1), ivec4(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.msl index 4d94d4fd30..287601b54a 100644 --- a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_fbf53f(texture2d_array tint_symbol_1) { - tint_symbol_1.write(int4(0), uint2(int2(0)), 1); + tint_symbol_1.write(int4(1), uint2(int2(1)), 1); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.spvasm index a037be9a63..d556e7cabd 100644 --- a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 39 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -38,38 +38,41 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 %int_1 = OpConstant %int 1 - %22 = OpConstantComposite %v3int %int_0 %int_0 %int_1 + %22 = OpConstantComposite %v2int %int_1 %int_1 %v4int = OpTypeVector %int 4 - %24 = OpConstantNull %v4int - %25 = OpTypeFunction %v4float + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 + %28 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_fbf53f = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - OpImageWrite %18 %22 %24 + %23 = OpCompositeExtract %int %22 0 + %24 = OpCompositeExtract %int %22 1 + %25 = OpCompositeConstruct %v3int %23 %24 %int_1 + OpImageWrite %18 %25 %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %25 - %27 = OpLabel - %28 = OpFunctionCall %void %textureStore_fbf53f +%vertex_main_inner = OpFunction %v4float None %28 + %30 = OpLabel + %31 = OpFunctionCall %void %textureStore_fbf53f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %30 = OpLabel - %31 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %31 + %33 = OpLabel + %34 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %34 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %void %textureStore_fbf53f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %37 = OpLabel %38 = OpFunctionCall %void %textureStore_fbf53f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_fbf53f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.wgsl index 888978b098..397e7336f0 100644 --- a/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fbf53f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_fbf53f() { - textureStore(arg_0, vec2(), 1i, vec4()); + textureStore(arg_0, vec2(1i), 1i, vec4(1i)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl index 323cd369bf..f6107e8e05 100644 --- a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_fcbe66() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl index b1b554db24..ed74902eb1 100644 --- a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_fcbe66() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl index b1b554db24..ed74902eb1 100644 --- a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_fcbe66() { - arg_0[(0u).xxx] = (0.0f).xxxx; + arg_0[(1u).xxx] = (1.0f).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl index c2349be016..1a089ef07a 100644 --- a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_fcbe66(texture3d tint_symbol_1) { - tint_symbol_1.write(float4(0.0f), uint3(uint3(0u))); + tint_symbol_1.write(float4(1.0f), uint3(uint3(1u))); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm index 6617ea5d6b..8b882f6470 100644 --- a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 35 +; Bound: 37 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -39,34 +39,36 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %20 = OpConstantNull %v3uint - %21 = OpTypeFunction %v4float + %uint_1 = OpConstant %uint 1 + %21 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %float_1 = OpConstant %float 1 + %23 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 + %24 = OpTypeFunction %v4float %textureStore_fcbe66 = OpFunction %void None %12 %15 = OpLabel %17 = OpLoad %11 %arg_0 - OpImageWrite %17 %20 %5 + OpImageWrite %17 %21 %23 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %21 - %23 = OpLabel - %24 = OpFunctionCall %void %textureStore_fcbe66 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %textureStore_fcbe66 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %26 = OpLabel - %27 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %27 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %30 = OpLabel - %31 = OpFunctionCall %void %textureStore_fcbe66 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_fcbe66 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %33 = OpLabel - %34 = OpFunctionCall %void %textureStore_fcbe66 + %35 = OpLabel + %36 = OpFunctionCall %void %textureStore_fcbe66 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl index 2b58eeb1f9..2908104690 100644 --- a/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fcbe66.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_fcbe66() { - textureStore(arg_0, vec3(), vec4()); + textureStore(arg_0, vec3(1u), vec4(1.0f)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl index abcaea1879..382f7f38a4 100644 --- a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl @@ -24,7 +24,7 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_fd350c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.dxc.hlsl index 30f14818fd..29317df6ed 100644 --- a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fd350c() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.fxc.hlsl index 30f14818fd..29317df6ed 100644 --- a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fd350c() { - arg_0[int3(0, 0, int(1u))] = (0u).xxxx; + arg_0[int3((1).xx, int(1u))] = (1u).xxxx; } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.glsl index 1996d04b5c..0ef517142f 100644 --- a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.glsl @@ -2,7 +2,7 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_fd350c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } vec4 vertex_main() { @@ -23,7 +23,7 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_fd350c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void fragment_main() { @@ -38,7 +38,7 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_fd350c() { - imageStore(arg_0, ivec3(0, 0, int(1u)), uvec4(0u)); + imageStore(arg_0, ivec3(ivec2(1), int(1u)), uvec4(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.msl index f77d52494f..9cb484c169 100644 --- a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.msl +++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureStore_fd350c(texture2d_array tint_symbol_1) { - tint_symbol_1.write(uint4(0u), uint2(int2(0)), 1u); + tint_symbol_1.write(uint4(1u), uint2(int2(1)), 1u); } struct tint_symbol { diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.spvasm index 9c156ab6e0..8c0dc58523 100644 --- a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -39,39 +39,43 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %int_0 = OpConstant %int 0 + %v2int = OpTypeVector %int 2 + %int_1 = OpConstant %int 1 + %23 = OpConstantComposite %v2int %int_1 %int_1 %uint_1 = OpConstant %uint 1 %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint - %27 = OpTypeFunction %v4float + %30 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 + %31 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_fd350c = OpFunction %void None %13 %16 = OpLabel %18 = OpLoad %11 %arg_0 - %22 = OpBitcast %int %uint_1 - %24 = OpCompositeConstruct %v3int %int_0 %int_0 %22 - OpImageWrite %18 %24 %26 + %24 = OpCompositeExtract %int %23 0 + %25 = OpCompositeExtract %int %23 1 + %26 = OpBitcast %int %uint_1 + %28 = OpCompositeConstruct %v3int %24 %25 %26 + OpImageWrite %18 %28 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_fd350c +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_fd350c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_fd350c + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_fd350c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_fd350c + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_fd350c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.wgsl index a880810d1a..cade5eeac1 100644 --- a/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/literal/textureStore/fd350c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_fd350c() { - textureStore(arg_0, vec2(), 1u, vec4()); + textureStore(arg_0, vec2(1i), 1u, vec4(1u)); } @vertex diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl index ef35ef8883..d9899e3bae 100644 --- a/test/tint/builtins/gen/var/cross/041cb0.wgsl +++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl @@ -23,8 +23,8 @@ // fn cross(vec3, vec3) -> vec3 fn cross_041cb0() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.f); + var arg_1 = vec3(1.f); var res: vec3 = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl index 272645fb5f..01264e75b6 100644 --- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.dxc.hlsl @@ -1,6 +1,6 @@ void cross_041cb0() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl index 272645fb5f..01264e75b6 100644 --- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.fxc.hlsl @@ -1,6 +1,6 @@ void cross_041cb0() { - float3 arg_0 = (0.0f).xxx; - float3 arg_1 = (0.0f).xxx; + float3 arg_0 = (1.0f).xxx; + float3 arg_1 = (1.0f).xxx; float3 res = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl index 87cb9a34c0..f31f8e1ff6 100644 --- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.glsl @@ -1,8 +1,8 @@ #version 310 es void cross_041cb0() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = cross(arg_0, arg_1); } @@ -23,8 +23,8 @@ void main() { precision mediump float; void cross_041cb0() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = cross(arg_0, arg_1); } @@ -39,8 +39,8 @@ void main() { #version 310 es void cross_041cb0() { - vec3 arg_0 = vec3(0.0f); - vec3 arg_1 = vec3(0.0f); + vec3 arg_0 = vec3(1.0f); + vec3 arg_1 = vec3(1.0f); vec3 res = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl index 49669392b1..657d9cb7e0 100644 --- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void cross_041cb0() { - float3 arg_0 = float3(0.0f); - float3 arg_1 = float3(0.0f); + float3 arg_0 = float3(1.0f); + float3 arg_1 = float3(1.0f); float3 res = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm index f7a1245ca7..3fe3bc6322 100644 --- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 38 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -34,42 +34,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %14 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %23 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %18 = OpConstantNull %v3float + %25 = OpTypeFunction %v4float %cross_041cb0 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v3float Function %14 - %arg_1 = OpVariable %_ptr_Function_v3float Function %14 - %res = OpVariable %_ptr_Function_v3float Function %14 - OpStore %arg_0 %14 - OpStore %arg_1 %14 - %20 = OpLoad %v3float %arg_0 - %21 = OpLoad %v3float %arg_1 - %18 = OpExtInst %v3float %19 Cross %20 %21 - OpStore %res %18 + %arg_0 = OpVariable %_ptr_Function_v3float Function %18 + %arg_1 = OpVariable %_ptr_Function_v3float Function %18 + %res = OpVariable %_ptr_Function_v3float Function %18 + OpStore %arg_0 %15 + OpStore %arg_1 %15 + %22 = OpLoad %v3float %arg_0 + %23 = OpLoad %v3float %arg_1 + %20 = OpExtInst %v3float %21 Cross %22 %23 + OpStore %res %20 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %23 - %25 = OpLabel - %26 = OpFunctionCall %void %cross_041cb0 +%vertex_main_inner = OpFunction %v4float None %25 + %27 = OpLabel + %28 = OpFunctionCall %void %cross_041cb0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %28 = OpLabel - %29 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %29 + %30 = OpLabel + %31 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %31 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %32 = OpLabel - %33 = OpFunctionCall %void %cross_041cb0 + %33 = OpLabel + %34 = OpFunctionCall %void %cross_041cb0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %35 = OpLabel - %36 = OpFunctionCall %void %cross_041cb0 + %36 = OpLabel + %37 = OpFunctionCall %void %cross_041cb0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl index 019e81b5e3..fa2f691289 100644 --- a/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cross/041cb0.wgsl.expected.wgsl @@ -1,6 +1,6 @@ fn cross_041cb0() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(1.0f); + var arg_1 = vec3(1.0f); var res : vec3 = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl index 39258c8702..cc7409f17c 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl @@ -25,8 +25,8 @@ enable f16; // fn cross(vec3, vec3) -> vec3 fn cross_9857cb() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(f16()); + var arg_1 = vec3(f16()); var res: vec3 = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl index c249f4f934..f1706c4213 100644 --- a/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/cross/9857cb.wgsl.expected.wgsl @@ -1,8 +1,8 @@ enable f16; fn cross_9857cb() { - var arg_0 = vec3(); - var arg_1 = vec3(); + var arg_0 = vec3(f16()); + var arg_1 = vec3(f16()); var res : vec3 = cross(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl index 752a7bd9b2..dbea6a0710 100644 --- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl +++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl @@ -23,7 +23,7 @@ // fn pack2x16float(vec2) -> u32 fn pack2x16float_0e97b3() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: u32 = pack2x16float(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl index 649e6f1da2..101f1f210d 100644 --- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16float(float2 param_0) { } void pack2x16float_0e97b3() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; uint res = tint_pack2x16float(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl index 649e6f1da2..101f1f210d 100644 --- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16float(float2 param_0) { } void pack2x16float_0e97b3() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; uint res = tint_pack2x16float(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl index ccefb26ee8..e41a07fe28 100644 --- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack2x16float_0e97b3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packHalf2x16(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void pack2x16float_0e97b3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packHalf2x16(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void pack2x16float_0e97b3() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packHalf2x16(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl index d72649aad6..9d3f17d158 100644 --- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack2x16float_0e97b3() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); uint res = as_type(half2(arg_0)); } diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm index 7855476f93..d384bb20e1 100644 --- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,42 +33,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint - %23 = OpConstantNull %uint - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %uint + %26 = OpTypeFunction %v4float %pack2x16float_0e97b3 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_uint Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %v2float %arg_0 - %17 = OpExtInst %uint %19 PackHalf2x16 %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_uint Function %25 + OpStore %arg_0 %15 + %22 = OpLoad %v2float %arg_0 + %19 = OpExtInst %uint %21 PackHalf2x16 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %pack2x16float_0e97b3 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %pack2x16float_0e97b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %pack2x16float_0e97b3 + %34 = OpLabel + %35 = OpFunctionCall %void %pack2x16float_0e97b3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %pack2x16float_0e97b3 + %37 = OpLabel + %38 = OpFunctionCall %void %pack2x16float_0e97b3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl index 27bed46737..a0049c0c90 100644 --- a/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pack2x16float/0e97b3.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack2x16float_0e97b3() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : u32 = pack2x16float(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl index d5f475e624..e0ca978079 100644 --- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl +++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl @@ -23,7 +23,7 @@ // fn pack2x16snorm(vec2) -> u32 fn pack2x16snorm_6c169b() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: u32 = pack2x16snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl index c9a6e51087..ef986439c7 100644 --- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16snorm(float2 param_0) { } void pack2x16snorm_6c169b() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; uint res = tint_pack2x16snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl index c9a6e51087..ef986439c7 100644 --- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16snorm(float2 param_0) { } void pack2x16snorm_6c169b() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; uint res = tint_pack2x16snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl index 06e70da875..671e3e967c 100644 --- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack2x16snorm_6c169b() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packSnorm2x16(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void pack2x16snorm_6c169b() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packSnorm2x16(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void pack2x16snorm_6c169b() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packSnorm2x16(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl index 64c72cf753..cca63927f3 100644 --- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack2x16snorm_6c169b() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); uint res = pack_float_to_snorm2x16(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm index daad82d957..bf9981b84f 100644 --- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,42 +33,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint - %23 = OpConstantNull %uint - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %uint + %26 = OpTypeFunction %v4float %pack2x16snorm_6c169b = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_uint Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %v2float %arg_0 - %17 = OpExtInst %uint %19 PackSnorm2x16 %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_uint Function %25 + OpStore %arg_0 %15 + %22 = OpLoad %v2float %arg_0 + %19 = OpExtInst %uint %21 PackSnorm2x16 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %pack2x16snorm_6c169b +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %pack2x16snorm_6c169b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %pack2x16snorm_6c169b + %34 = OpLabel + %35 = OpFunctionCall %void %pack2x16snorm_6c169b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %pack2x16snorm_6c169b + %37 = OpLabel + %38 = OpFunctionCall %void %pack2x16snorm_6c169b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl index 406794bdd4..ad7697a0bd 100644 --- a/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pack2x16snorm/6c169b.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack2x16snorm_6c169b() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : u32 = pack2x16snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl index 521e446dae..6be7de72ff 100644 --- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl +++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl @@ -23,7 +23,7 @@ // fn pack2x16unorm(vec2) -> u32 fn pack2x16unorm_0f08e4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.f); var res: u32 = pack2x16unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl index 3f37f6abc9..fcb4bea132 100644 --- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16unorm(float2 param_0) { } void pack2x16unorm_0f08e4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; uint res = tint_pack2x16unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl index 3f37f6abc9..fcb4bea132 100644 --- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack2x16unorm(float2 param_0) { } void pack2x16unorm_0f08e4() { - float2 arg_0 = (0.0f).xx; + float2 arg_0 = (1.0f).xx; uint res = tint_pack2x16unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl index 374bacf713..b88804383c 100644 --- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack2x16unorm_0f08e4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packUnorm2x16(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void pack2x16unorm_0f08e4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packUnorm2x16(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void pack2x16unorm_0f08e4() { - vec2 arg_0 = vec2(0.0f); + vec2 arg_0 = vec2(1.0f); uint res = packUnorm2x16(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl index 5433a6d655..9e4aec4253 100644 --- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack2x16unorm_0f08e4() { - float2 arg_0 = float2(0.0f); + float2 arg_0 = float2(1.0f); uint res = pack_float_to_unorm2x16(arg_0); } diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm index 6fd23d6d00..49aaa65d73 100644 --- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 38 +; Bound: 39 ; Schema: 0 OpCapability Shader - %19 = OpExtInstImport "GLSL.std.450" + %21 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -33,42 +33,43 @@ %void = OpTypeVoid %9 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %14 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %15 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %18 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint - %23 = OpConstantNull %uint - %24 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %25 = OpConstantNull %uint + %26 = OpTypeFunction %v4float %pack2x16unorm_0f08e4 = OpFunction %void None %9 %12 = OpLabel - %arg_0 = OpVariable %_ptr_Function_v2float Function %14 - %res = OpVariable %_ptr_Function_uint Function %23 - OpStore %arg_0 %14 - %20 = OpLoad %v2float %arg_0 - %17 = OpExtInst %uint %19 PackUnorm2x16 %20 - OpStore %res %17 + %arg_0 = OpVariable %_ptr_Function_v2float Function %18 + %res = OpVariable %_ptr_Function_uint Function %25 + OpStore %arg_0 %15 + %22 = OpLoad %v2float %arg_0 + %19 = OpExtInst %uint %21 PackUnorm2x16 %22 + OpStore %res %19 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %24 - %26 = OpLabel - %27 = OpFunctionCall %void %pack2x16unorm_0f08e4 +%vertex_main_inner = OpFunction %v4float None %26 + %28 = OpLabel + %29 = OpFunctionCall %void %pack2x16unorm_0f08e4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %29 = OpLabel - %30 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %30 + %31 = OpLabel + %32 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %32 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %33 = OpLabel - %34 = OpFunctionCall %void %pack2x16unorm_0f08e4 + %34 = OpLabel + %35 = OpFunctionCall %void %pack2x16unorm_0f08e4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %36 = OpLabel - %37 = OpFunctionCall %void %pack2x16unorm_0f08e4 + %37 = OpLabel + %38 = OpFunctionCall %void %pack2x16unorm_0f08e4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl index db3a3317a5..2b7ffb2cbe 100644 --- a/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pack2x16unorm/0f08e4.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack2x16unorm_0f08e4() { - var arg_0 = vec2(); + var arg_0 = vec2(1.0f); var res : u32 = pack2x16unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl index 378a21fe44..846ce98cfe 100644 --- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl +++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl @@ -23,7 +23,7 @@ // fn pack4x8snorm(vec4) -> u32 fn pack4x8snorm_4d22e7() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: u32 = pack4x8snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl index bdf414bfc2..c972c3ccda 100644 --- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8snorm(float4 param_0) { } void pack4x8snorm_4d22e7() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; uint res = tint_pack4x8snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl index bdf414bfc2..c972c3ccda 100644 --- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8snorm(float4 param_0) { } void pack4x8snorm_4d22e7() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; uint res = tint_pack4x8snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl index d7f64834eb..769ce4f464 100644 --- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack4x8snorm_4d22e7() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); uint res = packSnorm4x8(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void pack4x8snorm_4d22e7() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); uint res = packSnorm4x8(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void pack4x8snorm_4d22e7() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); uint res = packSnorm4x8(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl index 5463f994bf..49f2d32285 100644 --- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack4x8snorm_4d22e7() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); uint res = pack_float_to_snorm4x8(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm index 74247cd747..64f0b03a02 100644 --- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,41 +32,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint - %21 = OpConstantNull %uint - %22 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %23 = OpConstantNull %uint + %24 = OpTypeFunction %v4float %pack4x8snorm_4d22e7 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 - %res = OpVariable %_ptr_Function_uint Function %21 - OpStore %arg_0 %5 - %18 = OpLoad %v4float %arg_0 - %15 = OpExtInst %uint %17 PackSnorm4x8 %18 - OpStore %res %15 + %res = OpVariable %_ptr_Function_uint Function %23 + OpStore %arg_0 %14 + %20 = OpLoad %v4float %arg_0 + %17 = OpExtInst %uint %19 PackSnorm4x8 %20 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %pack4x8snorm_4d22e7 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pack4x8snorm_4d22e7 + %32 = OpLabel + %33 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %pack4x8snorm_4d22e7 + %35 = OpLabel + %36 = OpFunctionCall %void %pack4x8snorm_4d22e7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl index b83a2e3dc0..965c4ba3c2 100644 --- a/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pack4x8snorm/4d22e7.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack4x8snorm_4d22e7() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : u32 = pack4x8snorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl index e4f84c63e7..bef2623192 100644 --- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl +++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl @@ -23,7 +23,7 @@ // fn pack4x8unorm(vec4) -> u32 fn pack4x8unorm_95c456() { - var arg_0 = vec4(); + var arg_0 = vec4(1.f); var res: u32 = pack4x8unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl index 80d63c98d0..4577820160 100644 --- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.dxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8unorm(float4 param_0) { } void pack4x8unorm_95c456() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; uint res = tint_pack4x8unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl index 80d63c98d0..4577820160 100644 --- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.fxc.hlsl @@ -4,7 +4,7 @@ uint tint_pack4x8unorm(float4 param_0) { } void pack4x8unorm_95c456() { - float4 arg_0 = (0.0f).xxxx; + float4 arg_0 = (1.0f).xxxx; uint res = tint_pack4x8unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl index 8e9eb906d0..80a0b9b691 100644 --- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.glsl @@ -1,7 +1,7 @@ #version 310 es void pack4x8unorm_95c456() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); uint res = packUnorm4x8(arg_0); } @@ -22,7 +22,7 @@ void main() { precision mediump float; void pack4x8unorm_95c456() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); uint res = packUnorm4x8(arg_0); } @@ -37,7 +37,7 @@ void main() { #version 310 es void pack4x8unorm_95c456() { - vec4 arg_0 = vec4(0.0f); + vec4 arg_0 = vec4(1.0f); uint res = packUnorm4x8(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl index faab6f2318..acba42a54d 100644 --- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void pack4x8unorm_95c456() { - float4 arg_0 = float4(0.0f); + float4 arg_0 = float4(1.0f); uint res = pack_float_to_unorm4x8(arg_0); } diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm index cc7d9ea508..f064de4195 100644 --- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.spvasm @@ -1,10 +1,10 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 36 +; Bound: 37 ; Schema: 0 OpCapability Shader - %17 = OpExtInstImport "GLSL.std.450" + %19 = OpExtInstImport "GLSL.std.450" OpMemoryModel Logical GLSL450 OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size OpEntryPoint Fragment %fragment_main "fragment_main" @@ -32,41 +32,42 @@ %vertex_point_size = OpVariable %_ptr_Output_float Output %8 %void = OpTypeVoid %9 = OpTypeFunction %void + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %uint = OpTypeInt 32 0 %_ptr_Function_uint = OpTypePointer Function %uint - %21 = OpConstantNull %uint - %22 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %23 = OpConstantNull %uint + %24 = OpTypeFunction %v4float %pack4x8unorm_95c456 = OpFunction %void None %9 %12 = OpLabel %arg_0 = OpVariable %_ptr_Function_v4float Function %5 - %res = OpVariable %_ptr_Function_uint Function %21 - OpStore %arg_0 %5 - %18 = OpLoad %v4float %arg_0 - %15 = OpExtInst %uint %17 PackUnorm4x8 %18 - OpStore %res %15 + %res = OpVariable %_ptr_Function_uint Function %23 + OpStore %arg_0 %14 + %20 = OpLoad %v4float %arg_0 + %17 = OpExtInst %uint %19 PackUnorm4x8 %20 + OpStore %res %17 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %22 - %24 = OpLabel - %25 = OpFunctionCall %void %pack4x8unorm_95c456 +%vertex_main_inner = OpFunction %v4float None %24 + %26 = OpLabel + %27 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %9 - %27 = OpLabel - %28 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %28 + %29 = OpLabel + %30 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %30 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %9 - %31 = OpLabel - %32 = OpFunctionCall %void %pack4x8unorm_95c456 + %32 = OpLabel + %33 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %9 - %34 = OpLabel - %35 = OpFunctionCall %void %pack4x8unorm_95c456 + %35 = OpLabel + %36 = OpFunctionCall %void %pack4x8unorm_95c456 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl index 195c952b3b..653c338a2e 100644 --- a/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/pack4x8unorm/95c456.wgsl.expected.wgsl @@ -1,5 +1,5 @@ fn pack4x8unorm_95c456() { - var arg_0 = vec4(); + var arg_0 = vec4(1.0f); var res : u32 = pack4x8unorm(arg_0); } diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl index 472ed0e0fc..cf83de4b5c 100644 --- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl +++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_0166ec() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl index d0981dd0c2..d60956fc0f 100644 --- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_0166ec() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl index d0981dd0c2..d60956fc0f 100644 --- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_0166ec() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl index 0968a8e5fb..ec7e9347a7 100644 --- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -43,7 +43,7 @@ void main() { uniform highp isamplerCube arg_1_arg_2; void textureGather_0166ec() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl index c58d5a4fb0..fee24ff01f 100644 --- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_0166ec(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm index d5f704559f..23ec39208c 100644 --- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %v4int = OpTypeVector %int 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4int + %38 = OpTypeFunction %v4float %textureGather_0166ec = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %res = OpVariable %_ptr_Function_v4int Function %35 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v3float %arg_3 - %24 = OpImageGather %v4int %29 %30 %uint_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %res = OpVariable %_ptr_Function_v4int Function %37 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_3 + %26 = OpImageGather %v4int %31 %32 %uint_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_0166ec +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_0166ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_0166ec + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_0166ec OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_0166ec + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_0166ec OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl index fca6c7035f..d268bb88f2 100644 --- a/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/0166ec.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_0166ec() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl index e7aeacf1f0..fa77c2419c 100644 --- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl +++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_04fa78() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl index 9297a9cb80..4afd573ddb 100644 --- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_04fa78() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl index 9297a9cb80..4afd573ddb 100644 --- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_04fa78() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl index 4a1a2484dc..3deccdb103 100644 --- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_04fa78(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint arg_4 = 1u; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm index e3140b5f8e..746c8915e1 100644 --- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,58 +47,59 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %28 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %_ptr_Function_v4int = OpTypePointer Function %v4int - %44 = OpConstantNull %v4int - %45 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpConstantNull %v4int + %47 = OpTypeFunction %v4float %textureGather_04fa78 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %28 - %res = OpVariable %_ptr_Function_v4int Function %44 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %46 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %uint %arg_4 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %29 = OpImageGather %v4int %34 %41 %uint_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %uint %arg_4 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %31 = OpImageGather %v4int %36 %43 %uint_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_04fa78 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_04fa78 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_04fa78 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_04fa78 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_04fa78 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_04fa78 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl index de2c50b4b6..39758e370b 100644 --- a/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/04fa78.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_04fa78() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl index 49612c6fc9..05dff14010 100644 --- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl +++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_10c554() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl index eab22776f4..1e4265cc69 100644 --- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_10c554() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float4 res = arg_0.Gather(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl index eab22776f4..1e4265cc69 100644 --- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_10c554() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float4 res = arg_0.Gather(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl index e6f2add193..2a84b78e8d 100644 --- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0); } @@ -43,7 +43,7 @@ void main() { uniform highp samplerCubeShadow arg_0_arg_1; void textureGather_10c554() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0); } diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.msl index 16595bde0d..5c6e114841 100644 --- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_10c554(depthcube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.spvasm index 76b255317f..ccd308ba46 100644 --- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v3float + %28 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_10c554 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - %24 = OpLoad %14 %arg_1 - %25 = OpLoad %11 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v3float %arg_2 - %23 = OpImageGather %v4float %27 %28 %int_0 - OpStore %res %23 + OpStore %arg_2 %21 + %26 = OpLoad %14 %arg_1 + %27 = OpLoad %11 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v3float %arg_2 + %25 = OpImageGather %v4float %29 %30 %int_0 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_10c554 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_10c554 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_10c554 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_10c554 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_10c554 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_10c554 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl index 4df84e8e08..ae368d7cc6 100644 --- a/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/10c554.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_10c554() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl index 65736b05ad..fb0c520f71 100644 --- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl +++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_11b2db() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl index 5638aaa277..1c983e74eb 100644 --- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_11b2db() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl index 5638aaa277..1c983e74eb 100644 --- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_11b2db() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl index dc0f61378a..317ebf174d 100644 --- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -43,7 +43,7 @@ void main() { uniform highp samplerCube arg_1_arg_2; void textureGather_11b2db() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl index d99c749a21..7f10956c17 100644 --- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_11b2db(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm index 0e70b08a83..a59ac561ab 100644 --- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v3float + %28 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_11b2db = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 - %24 = OpLoad %14 %arg_2 - %25 = OpLoad %11 %arg_1 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v3float %arg_3 - %23 = OpImageGather %v4float %27 %28 %uint_1 - OpStore %res %23 + OpStore %arg_3 %21 + %26 = OpLoad %14 %arg_2 + %27 = OpLoad %11 %arg_1 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v3float %arg_3 + %25 = OpImageGather %v4float %29 %30 %uint_1 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_11b2db +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_11b2db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_11b2db + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_11b2db OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_11b2db + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_11b2db OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl index 90c164759a..08e6fb457a 100644 --- a/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/11b2db.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_11b2db() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl index d717bcc569..14e25b3bae 100644 --- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl +++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_17baac() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl index 9002334340..72fd55e8a8 100644 --- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_17baac() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl index 9002334340..72fd55e8a8 100644 --- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_17baac() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl index 3b1b280393..488771178a 100644 --- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_17baac() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl index 88431607d2..615bad2b5d 100644 --- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_17baac(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm index fe201457c3..0fbb131ec8 100644 --- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,58 +45,59 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpTypeFunction %v4float %textureGather_17baac = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %uint_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %uint %arg_4 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %uint %arg_4 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_17baac +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_17baac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_17baac + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_17baac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_17baac + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_17baac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl index 349edb20c7..9f0f4d8f05 100644 --- a/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/17baac.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_17baac() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl index a58858cfca..a705c58603 100644 --- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl +++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_1bf0ab() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl index 4f5b1e37e9..0fb129e410 100644 --- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_1bf0ab() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl index 4f5b1e37e9..0fb129e410 100644 --- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_1bf0ab() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl index e7f08f3694..4e5727ef8c 100644 --- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -45,7 +45,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_1bf0ab() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl index 5040fe0e7a..7d8e52e6bf 100644 --- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_1bf0ab(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm index 44eaae6501..58681a8871 100644 --- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,57 +46,58 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %43 = OpConstantNull %v4uint - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %45 = OpConstantNull %v4uint + %46 = OpTypeFunction %v4float %textureGather_1bf0ab = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 - %res = OpVariable %_ptr_Function_v4uint Function %43 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %45 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %uint %arg_4 - %38 = OpConvertUToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4uint %33 %40 %uint_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %uint %arg_4 + %40 = OpConvertUToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4uint %35 %42 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_1bf0ab +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_1bf0ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_1bf0ab + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_1bf0ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_1bf0ab + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_1bf0ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl index 75e5f39d33..d9a878ddf4 100644 --- a/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/1bf0ab.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_1bf0ab() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl index b88af9afbd..1b443705a6 100644 --- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl +++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl @@ -25,8 +25,8 @@ // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_1f7f6b() { - var arg_2 = vec2(); - const arg_3 = vec2(); + var arg_2 = vec2(1.f); + const arg_3 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl index 36412fad8e..e305a42006 100644 --- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_1f7f6b() { - float2 arg_2 = (0.0f).xx; - float4 res = arg_0.Gather(arg_1, arg_2, (0).xx); + float2 arg_2 = (1.0f).xx; + float4 res = arg_0.Gather(arg_1, arg_2, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl index 36412fad8e..e305a42006 100644 --- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_1f7f6b() { - float2 arg_2 = (0.0f).xx; - float4 res = arg_0.Gather(arg_1, arg_2, (0).xx); + float2 arg_2 = (1.0f).xx; + float4 res = arg_0.Gather(arg_1, arg_2, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl index 151624890f..ecf2cdb849 100644 --- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.glsl @@ -3,8 +3,8 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec2 arg_2 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(0)); + vec2 arg_2 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(1)); } vec4 vertex_main() { @@ -26,8 +26,8 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec2 arg_2 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(0)); + vec2 arg_2 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(1)); } void fragment_main() { @@ -43,8 +43,8 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGather_1f7f6b() { - vec2 arg_2 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(0)); + vec2 arg_2 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, 0.0, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl index 5219d4f534..ebfd1051a6 100644 --- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureGather_1f7f6b(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, int2(0)); + float2 arg_2 = float2(1.0f); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm index d32d0526d6..a591867ed7 100644 --- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,48 +44,50 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v2float + %28 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpTypeFunction %v4float %textureGather_1f7f6b = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - %24 = OpLoad %14 %arg_1 - %25 = OpLoad %11 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v2float %arg_2 - %23 = OpImageGather %v4float %27 %28 %int_0 ConstOffset %32 - OpStore %res %23 + OpStore %arg_2 %21 + %26 = OpLoad %14 %arg_1 + %27 = OpLoad %11 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v2float %arg_2 + %25 = OpImageGather %v4float %29 %30 %int_0 ConstOffset %35 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_1f7f6b +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_1f7f6b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_1f7f6b + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_1f7f6b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_1f7f6b + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_1f7f6b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl index 806fc3e526..a44f565af5 100644 --- a/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/1f7f6b.wgsl.expected.wgsl @@ -3,8 +3,8 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_1f7f6b() { - var arg_2 = vec2(); - const arg_3 = vec2(); + var arg_2 = vec2(1.0f); + const arg_3 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl index 0128b0e06a..507c665746 100644 --- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl +++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_22e930() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl index 7aa31c9885..945645e05d 100644 --- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_22e930() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl index 7aa31c9885..945645e05d 100644 --- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_22e930() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl index af841336f9..618b4d8f9e 100644 --- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_22e930() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.msl index d6b3f74d37..f24c1637a2 100644 --- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_22e930(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm index dce3fe053d..80bd1205a7 100644 --- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,56 +45,57 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %42 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %44 = OpTypeFunction %v4float %textureGather_22e930 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %int_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %int %arg_4 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %int %arg_4 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_22e930 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_22e930 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureGather_22e930 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_22e930 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_22e930 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_22e930 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl index f26e58c00b..e35eec4e2f 100644 --- a/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/22e930.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_22e930() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl index 44f52d8c41..2e4fcc6b20 100644 --- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl +++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_238ec4() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl index e49c257fb0..51aa04d0a9 100644 --- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_238ec4() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl index e49c257fb0..51aa04d0a9 100644 --- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_238ec4() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl index 680cf42523..e7fb956382 100644 --- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_238ec4() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl index eeeca6f835..51590a75a7 100644 --- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_238ec4(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm index 16698c174c..6eca3aedfc 100644 --- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,59 +45,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %42 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %45 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %45 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureGather_238ec4 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %uint_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %uint %arg_4 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %42 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %uint %arg_4 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %uint_1 ConstOffset %45 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_238ec4 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_238ec4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_238ec4 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_238ec4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_238ec4 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_238ec4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl index 1e413457c5..bc1135b282 100644 --- a/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/238ec4.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_238ec4() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl index ec58dacaf7..d6a59890a1 100644 --- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl +++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_24b0bd() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl index cd9fc73407..832e6ef456 100644 --- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_24b0bd() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl index cd9fc73407..832e6ef456 100644 --- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_24b0bd() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl index 9bb35223b1..a1159f2869 100644 --- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_24b0bd() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.msl index 399253afe0..831c73661e 100644 --- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_24b0bd(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm index afb0711d8f..98ce9c68be 100644 --- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,58 +45,59 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpTypeFunction %v4float %textureGather_24b0bd = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %int_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %int %arg_4 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %uint_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %int %arg_4 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_24b0bd +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_24b0bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_24b0bd + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_24b0bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_24b0bd + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_24b0bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl index 55a88fe12a..84b2988394 100644 --- a/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/24b0bd.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_24b0bd() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl index 8297c39ac2..ffaca0e17a 100644 --- a/test/tint/builtins/gen/var/textureGather/269250.wgsl +++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_269250() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl index 65592970c8..fc1837779e 100644 --- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_269250() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl index 65592970c8..fc1837779e 100644 --- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_269250() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl index f3f577a5f7..bf6833ae9e 100644 --- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -45,7 +45,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_269250() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl index 1e8f39c21f..6c96964dc5 100644 --- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_269250(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm index 36bdfabb13..030eb453a5 100644 --- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,58 +46,59 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %28 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %44 = OpConstantNull %v4int - %45 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpConstantNull %v4int + %47 = OpTypeFunction %v4float %textureGather_269250 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %28 - %res = OpVariable %_ptr_Function_v4int Function %44 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %46 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_4 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4int %34 %41 %uint_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_4 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4int %36 %43 %uint_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_269250 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_269250 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_269250 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_269250 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_269250 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_269250 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl index e2c82c1022..c6d0fba683 100644 --- a/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/269250.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_269250() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl index c2be9eed5f..13c07d541a 100644 --- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl +++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_2a4f40() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl index 1b3539de2b..14b7917d86 100644 --- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2a4f40() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl index 1b3539de2b..14b7917d86 100644 --- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2a4f40() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl index bdf959ddd0..347d5d89c2 100644 --- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_2a4f40() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0); } diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl index e29dd88fa3..2dab3503bd 100644 --- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_2a4f40(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm index f21c774de7..fcbc8b3623 100644 --- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,58 +45,59 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpTypeFunction %v4float %textureGather_2a4f40 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - %29 = OpLoad %14 %arg_1 - %30 = OpLoad %11 %arg_0 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_2 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %uint %arg_3 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_0 - OpStore %res %28 + %31 = OpLoad %14 %arg_1 + %32 = OpLoad %11 %arg_0 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_2 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %uint %arg_3 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_2a4f40 +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_2a4f40 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_2a4f40 + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_2a4f40 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_2a4f40 + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_2a4f40 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl index 2b827fde0e..e86a396d92 100644 --- a/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/2a4f40.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_2a4f40() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl index 997c0ad7c6..c423d0121c 100644 --- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl +++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_2cc066() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl index 3d64cb3118..9f48ff9cde 100644 --- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_2cc066() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl index 3d64cb3118..9f48ff9cde 100644 --- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_2cc066() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl index 42cedd124d..416f378401 100644 --- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -45,7 +45,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_2cc066() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.msl index 1788324a49..0d34a69420 100644 --- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_2cc066(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm index ba22c06769..cbc4abe9d8 100644 --- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,58 +46,59 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %28 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %44 = OpConstantNull %v4uint - %45 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpConstantNull %v4uint + %47 = OpTypeFunction %v4float %textureGather_2cc066 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %28 - %res = OpVariable %_ptr_Function_v4uint Function %44 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %46 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_4 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4uint %34 %41 %int_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_4 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4uint %36 %43 %int_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_2cc066 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_2cc066 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_2cc066 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_2cc066 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_2cc066 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_2cc066 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl index 14d6c50229..456b2e8555 100644 --- a/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/2cc066.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_2cc066() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl index 0d14aa36a1..eef9c5a23a 100644 --- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl +++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_2e0ed5() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl index 995319a09a..2697be0412 100644 --- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2e0ed5() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = arg_0.Gather(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl index 995319a09a..2697be0412 100644 --- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_2e0ed5() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = arg_0.Gather(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl index 56056aeb55..87da0325fd 100644 --- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0); } @@ -43,7 +43,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGather_2e0ed5() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureGather(arg_0_arg_1, arg_2, 0.0); } diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.msl index 0fafcf7131..dc3340b300 100644 --- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_2e0ed5(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.spvasm index c33a890d85..77916f4515 100644 --- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v2float + %28 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_2e0ed5 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - %24 = OpLoad %14 %arg_1 - %25 = OpLoad %11 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v2float %arg_2 - %23 = OpImageGather %v4float %27 %28 %int_0 - OpStore %res %23 + OpStore %arg_2 %21 + %26 = OpLoad %14 %arg_1 + %27 = OpLoad %11 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v2float %arg_2 + %25 = OpImageGather %v4float %29 %30 %int_0 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_2e0ed5 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_2e0ed5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_2e0ed5 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_2e0ed5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_2e0ed5 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_2e0ed5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl index b5d2415adf..989f3b1b4b 100644 --- a/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/2e0ed5.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_2e0ed5() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl index 8819419f4c..467daedbdb 100644 --- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl +++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_32c4e8() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl index 6843bb16f9..d7e71064e1 100644 --- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_32c4e8() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl index 6843bb16f9..d7e71064e1 100644 --- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_32c4e8() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl index aa2ae8009b..65a395ec8a 100644 --- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -43,7 +43,7 @@ void main() { uniform highp samplerCube arg_1_arg_2; void textureGather_32c4e8() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, 1); } diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.msl index 6bcc6d7fd3..384b43dcf8 100644 --- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_32c4e8(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.spvasm index af17d8105b..06793104e8 100644 --- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v3float + %28 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_32c4e8 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 - %24 = OpLoad %14 %arg_2 - %25 = OpLoad %11 %arg_1 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v3float %arg_3 - %23 = OpImageGather %v4float %27 %28 %int_1 - OpStore %res %23 + OpStore %arg_3 %21 + %26 = OpLoad %14 %arg_2 + %27 = OpLoad %11 %arg_1 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v3float %arg_3 + %25 = OpImageGather %v4float %29 %30 %int_1 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_32c4e8 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_32c4e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_32c4e8 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_32c4e8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_32c4e8 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_32c4e8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl index e93f80cbe3..94a628c47e 100644 --- a/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/32c4e8.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_32c4e8() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl index 52a131e209..9ca8ec51bb 100644 --- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl +++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_3b32cc() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl index 2845979813..eaf94195a6 100644 --- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_3b32cc() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl index 2845979813..eaf94195a6 100644 --- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_3b32cc() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl index 12cba16237..29a49700f0 100644 --- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -43,7 +43,7 @@ void main() { uniform highp usamplerCube arg_1_arg_2; void textureGather_3b32cc() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, 1); } diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.msl index f1dfbe57b2..e50181c4fa 100644 --- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_3b32cc(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.spvasm index 2a2979191f..98c22b48f9 100644 --- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %v4uint = OpTypeVector %uint 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %35 = OpConstantNull %v4uint - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4uint + %38 = OpTypeFunction %v4float %textureGather_3b32cc = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %res = OpVariable %_ptr_Function_v4uint Function %35 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v3float %arg_3 - %24 = OpImageGather %v4uint %29 %30 %int_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %37 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_3 + %26 = OpImageGather %v4uint %31 %32 %int_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_3b32cc +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_3b32cc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_3b32cc + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_3b32cc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_3b32cc + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_3b32cc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl index a7963b2a61..8a0e075428 100644 --- a/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/3b32cc.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_3b32cc() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl index ccd65bdbf7..1eac371c1b 100644 --- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl +++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_43025d() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl index 95e40237e6..128461304a 100644 --- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_43025d() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl index 95e40237e6..128461304a 100644 --- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_43025d() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.msl index ed0f44ae9e..a5c861679d 100644 --- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_43025d(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm index 50439ce0bb..3e8b0a451f 100644 --- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,57 +46,58 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %43 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %45 = OpTypeFunction %v4float %textureGather_43025d = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - %29 = OpLoad %14 %arg_1 - %30 = OpLoad %11 %arg_0 - %32 = OpSampledImage %31 %30 %29 - %33 = OpLoad %v3float %arg_2 - %34 = OpCompositeExtract %float %33 0 - %35 = OpCompositeExtract %float %33 1 - %36 = OpCompositeExtract %float %33 2 - %38 = OpLoad %int %arg_3 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v4float %34 %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_0 - OpStore %res %28 + %31 = OpLoad %14 %arg_1 + %32 = OpLoad %11 %arg_0 + %34 = OpSampledImage %33 %32 %31 + %35 = OpLoad %v3float %arg_2 + %36 = OpCompositeExtract %float %35 0 + %37 = OpCompositeExtract %float %35 1 + %38 = OpCompositeExtract %float %35 2 + %40 = OpLoad %int %arg_3 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_43025d +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_43025d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %52 = OpLabel - %53 = OpFunctionCall %void %textureGather_43025d + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_43025d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_43025d + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_43025d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl index 12337c72fd..b693dd2d85 100644 --- a/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/43025d.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_43025d() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl index e67711f4d3..92c5d402e2 100644 --- a/test/tint/builtins/gen/var/textureGather/445793.wgsl +++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_445793() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl index 0d4c5a3a08..38175e3293 100644 --- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_445793() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl index 0d4c5a3a08..38175e3293 100644 --- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_445793() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl index 0528a0a2bf..6b372acfb4 100644 --- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -45,7 +45,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_445793() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.msl index c77189e5e5..a3d869ae7a 100644 --- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_445793(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm index 62dbbf4f8f..6b025b84b2 100644 --- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,59 +46,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %45 = OpConstantNull %v4int - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4int + %48 = OpTypeFunction %v4float %textureGather_445793 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %27 - %res = OpVariable %_ptr_Function_v4int Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %int %arg_4 - %38 = OpConvertSToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4int %33 %40 %uint_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %int %arg_4 + %40 = OpConvertSToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4int %35 %42 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_445793 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_445793 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_445793 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_445793 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_445793 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_445793 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl index 60c03e697d..7ddaed04cb 100644 --- a/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/445793.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_445793() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl index 09fe4aa284..b5a1bd2ae1 100644 --- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl +++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl @@ -26,8 +26,8 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_49b07f() { const arg_0 = 1i; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.f); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl index 42046f3c0d..97cef512cb 100644 --- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_49b07f() { - float2 arg_3 = (0.0f).xx; - uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl index 42046f3c0d..97cef512cb 100644 --- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_49b07f() { - float2 arg_3 = (0.0f).xx; - uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl index e576f45ad9..f16d38bffd 100644 --- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.glsl @@ -3,8 +3,8 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - vec2 arg_3 = vec2(0.0f); - uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } vec4 vertex_main() { @@ -26,8 +26,8 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - vec2 arg_3 = vec2(0.0f); - uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } void fragment_main() { @@ -43,8 +43,8 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_49b07f() { - vec2 arg_3 = vec2(0.0f); - uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl index b83245ec2f..554eaa6d67 100644 --- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureGather_49b07f(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); - uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); + float2 arg_3 = float2(1.0f); + uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm index bc3d0f9ce2..7558727015 100644 --- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,50 +45,51 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4uint = OpTypeVector %uint 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %37 = OpConstantNull %v4uint - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %textureGather_49b07f = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4uint Function %37 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4uint %29 %30 %int_1 ConstOffset %34 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %39 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4uint %31 %32 %int_1 ConstOffset %36 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_49b07f +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGather_49b07f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_49b07f + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_49b07f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_49b07f + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_49b07f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl index bba9c029d3..8704bc1f6a 100644 --- a/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/49b07f.wgsl.expected.wgsl @@ -4,8 +4,8 @@ fn textureGather_49b07f() { const arg_0 = 1i; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.0f); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl index f49a5ebce4..9f76bb56c2 100644 --- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl +++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_4b8103() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl index 5016110b55..5011165973 100644 --- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4b8103() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl index 5016110b55..5011165973 100644 --- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4b8103() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl index 186aab25b4..1edafe585f 100644 --- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_4b8103() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl index 2c3b8cd343..ebc75ffa6b 100644 --- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_4b8103(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm index 6b14a0827e..31b230e02a 100644 --- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,58 +45,59 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %41 = OpConstantNull %v2int + %43 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpTypeFunction %v4float %textureGather_4b8103 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %int_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %int %arg_4 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_1 ConstOffset %41 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %int %arg_4 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_1 ConstOffset %43 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_4b8103 +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_4b8103 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_4b8103 + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_4b8103 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_4b8103 + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_4b8103 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl index d7bba31be5..2e80b1ae44 100644 --- a/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/4b8103.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_4b8103() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl index 76f0a70227..b9ca9f7ca0 100644 --- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl +++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_4e8ac5() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl index b7cd24749a..4a2c24278f 100644 --- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4e8ac5() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl index b7cd24749a..4a2c24278f 100644 --- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_4e8ac5() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl index 20d7c66e8d..eaecf158eb 100644 --- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -45,7 +45,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_4e8ac5() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl index da3939b5cc..bf7d3abaec 100644 --- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_4e8ac5(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm index fe9d0d48a3..474856312b 100644 --- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,59 +46,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %28 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %45 = OpConstantNull %v4int - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4int + %48 = OpTypeFunction %v4float %textureGather_4e8ac5 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %28 - %res = OpVariable %_ptr_Function_v4int Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_4 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4int %34 %41 %int_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_4 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4int %36 %43 %int_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_4e8ac5 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_4e8ac5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_4e8ac5 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_4e8ac5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_4e8ac5 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_4e8ac5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl index e1ccdbf8aa..742d85e182 100644 --- a/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/4e8ac5.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_4e8ac5() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl index 29584a3701..70b0b57128 100644 --- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl +++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_5266da() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl index f449a19774..a7dba3dada 100644 --- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5266da() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl index f449a19774..a7dba3dada 100644 --- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5266da() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl index 33c4c0ff6f..4aa9d51096 100644 --- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -43,7 +43,7 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_5266da() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, 1); } diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.msl index 09bd3bbd5e..71f313490b 100644 --- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_5266da(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.spvasm index b1bb4b9e89..3281e7bfdc 100644 --- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v2float + %28 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_5266da = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 - %24 = OpLoad %14 %arg_2 - %25 = OpLoad %11 %arg_1 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v2float %arg_3 - %23 = OpImageGather %v4float %27 %28 %int_1 - OpStore %res %23 + OpStore %arg_3 %21 + %26 = OpLoad %14 %arg_2 + %27 = OpLoad %11 %arg_1 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v2float %arg_3 + %25 = OpImageGather %v4float %29 %30 %int_1 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_5266da +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_5266da OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_5266da + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_5266da OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_5266da + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_5266da OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl index b3469f785d..5d30699a30 100644 --- a/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/5266da.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_5266da() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl index e490508543..ea37944c22 100644 --- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl +++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_59372a() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl index 9e2af14ef2..1843c50dda 100644 --- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_59372a() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl index 9e2af14ef2..1843c50dda 100644 --- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_59372a() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl index d0c0e51252..a0cd1ad6ed 100644 --- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_59372a() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl index 2299af0429..ac817accf7 100644 --- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_59372a(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm index 159651c33f..502415e9df 100644 --- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,60 +45,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %43 = OpConstantNull %v2int + %45 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureGather_59372a = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %uint_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %uint %arg_4 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_1 ConstOffset %43 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %uint %arg_4 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_1 ConstOffset %45 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_59372a +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_59372a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_59372a + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_59372a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_59372a + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_59372a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl index fec8fe90d2..ffe7a1bd0a 100644 --- a/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/59372a.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_59372a() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl index 37ad80abab..f1b04a03ec 100644 --- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl +++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_5ba85f() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl index 39a0d15a2e..f6d03882b9 100644 --- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5ba85f() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl index 39a0d15a2e..f6d03882b9 100644 --- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5ba85f() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl index 096f596b49..936cbd1f8a 100644 --- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -43,7 +43,7 @@ void main() { uniform highp isamplerCube arg_1_arg_2; void textureGather_5ba85f() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, 1); } diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.msl index 23a45a4670..1918822a61 100644 --- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_5ba85f(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.spvasm index 30b40eb280..6ad4fe9f16 100644 --- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,47 +45,48 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %v4int = OpTypeVector %int 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4int + %37 = OpTypeFunction %v4float %textureGather_5ba85f = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %res = OpVariable %_ptr_Function_v4int Function %34 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v3float %arg_3 - %24 = OpImageGather %v4int %29 %30 %int_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %res = OpVariable %_ptr_Function_v4int Function %36 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_3 + %26 = OpImageGather %v4int %31 %32 %int_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_5ba85f +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_5ba85f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_5ba85f + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_5ba85f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_5ba85f + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_5ba85f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl index d2a3918065..bd363292a8 100644 --- a/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/5ba85f.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_5ba85f() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl index 1e5c68f950..ab1dd80831 100644 --- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl +++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_5bd491() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl index 50701a2fdf..4027ec061d 100644 --- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5bd491() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl index 50701a2fdf..4027ec061d 100644 --- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_5bd491() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl index 1cb6b09ae3..8b8939d149 100644 --- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -43,7 +43,7 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_5bd491() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, 1); } diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.msl index 22227a8497..ba70f352e7 100644 --- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_5bd491(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.spvasm index 601e9883a3..93c18ed076 100644 --- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4uint = OpTypeVector %uint 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %35 = OpConstantNull %v4uint - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4uint + %38 = OpTypeFunction %v4float %textureGather_5bd491 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4uint Function %35 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4uint %29 %30 %int_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %37 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4uint %31 %32 %int_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_5bd491 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_5bd491 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_5bd491 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_5bd491 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_5bd491 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_5bd491 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl index 835c7abae2..64bee25e48 100644 --- a/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/5bd491.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_5bd491() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl index b47e75eb61..93046b99b4 100644 --- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl +++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_6b7b74() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl index 691fd8d74b..483b16f679 100644 --- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_6b7b74() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl index 691fd8d74b..483b16f679 100644 --- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_6b7b74() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl index bb9053cd64..cc2e9b5589 100644 --- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_6b7b74() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl index 188a667e04..584583c0f2 100644 --- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_6b7b74(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; - uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm index dcb03e7089..6794f0568a 100644 --- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 61 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,62 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %43 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %46 = OpConstantNull %v4uint - %47 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %49 = OpConstantNull %v4uint + %50 = OpTypeFunction %v4float %textureGather_6b7b74 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 - %res = OpVariable %_ptr_Function_v4uint Function %46 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %49 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %uint %arg_4 - %38 = OpConvertUToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4uint %33 %40 %uint_1 ConstOffset %43 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %uint %arg_4 + %40 = OpConvertUToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4uint %35 %42 %uint_1 ConstOffset %46 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %47 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_6b7b74 +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_6b7b74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %52 = OpLabel - %53 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %53 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_6b7b74 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_6b7b74 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %59 = OpLabel - %60 = OpFunctionCall %void %textureGather_6b7b74 + %61 = OpLabel + %62 = OpFunctionCall %void %textureGather_6b7b74 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl index 62867d75c5..ab4d5c8123 100644 --- a/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/6b7b74.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_6b7b74() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl index 304233aa82..04590847aa 100644 --- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl +++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_751f8a() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl index 4b0055f8cf..4861cca778 100644 --- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_751f8a() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl index 4b0055f8cf..4861cca778 100644 --- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_751f8a() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.msl index 4b8c748f63..8e00dce4c9 100644 --- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_751f8a(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int arg_4 = 1; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm index d65968a079..9792c253f3 100644 --- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,56 +46,57 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %42 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %44 = OpTypeFunction %v4float %textureGather_751f8a = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %int_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %33 = OpLoad %v3float %arg_3 - %34 = OpCompositeExtract %float %33 0 - %35 = OpCompositeExtract %float %33 1 - %36 = OpCompositeExtract %float %33 2 - %38 = OpLoad %int %arg_4 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v4float %34 %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %35 = OpLoad %v3float %arg_3 + %36 = OpCompositeExtract %float %35 0 + %37 = OpCompositeExtract %float %35 1 + %38 = OpCompositeExtract %float %35 2 + %40 = OpLoad %int %arg_4 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_751f8a +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_751f8a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureGather_751f8a + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_751f8a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_751f8a + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_751f8a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl index 6d844ccb0d..827faaf77b 100644 --- a/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/751f8a.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_751f8a() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl index b78bd39875..77f57244bc 100644 --- a/test/tint/builtins/gen/var/textureGather/788010.wgsl +++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_788010() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl index 130a99eb62..098bc2a1fb 100644 --- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_788010() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl index 130a99eb62..098bc2a1fb 100644 --- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_788010() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl index 2c807123aa..5968236ae1 100644 --- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_788010(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint arg_4 = 1u; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm index 7e9ec260d5..d4b6a12bba 100644 --- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,59 +47,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %28 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %45 = OpConstantNull %v4int - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4int + %48 = OpTypeFunction %v4float %textureGather_788010 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %28 - %res = OpVariable %_ptr_Function_v4int Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %uint %arg_4 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %29 = OpImageGather %v4int %34 %41 %int_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %uint %arg_4 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %31 = OpImageGather %v4int %36 %43 %int_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_788010 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_788010 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_788010 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_788010 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_788010 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_788010 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl index 3f426c459e..52ad4c61b2 100644 --- a/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/788010.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_788010() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl index 1399be91d4..4e18be0005 100644 --- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl +++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl @@ -26,8 +26,8 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_7c3828() { const arg_0 = 1i; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.f); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl index af880b4c3c..ffe464d326 100644 --- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_7c3828() { - float2 arg_3 = (0.0f).xx; - int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl index af880b4c3c..ffe464d326 100644 --- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_7c3828() { - float2 arg_3 = (0.0f).xx; - int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl index 862ebb491b..c1d56be77e 100644 --- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.glsl @@ -3,8 +3,8 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - vec2 arg_3 = vec2(0.0f); - ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } vec4 vertex_main() { @@ -26,8 +26,8 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - vec2 arg_3 = vec2(0.0f); - ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } void fragment_main() { @@ -43,8 +43,8 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_7c3828() { - vec2 arg_3 = vec2(0.0f); - ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl index 9772d44d29..9c4e56861f 100644 --- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureGather_7c3828(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); - int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); + float2 arg_3 = float2(1.0f); + int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm index 18f210e0db..b704f03f52 100644 --- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,49 +45,50 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4int = OpTypeVector %int 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %35 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %36 = OpConstantNull %v4int - %37 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %38 = OpConstantNull %v4int + %39 = OpTypeFunction %v4float %textureGather_7c3828 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4int Function %36 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4int %29 %30 %int_1 ConstOffset %33 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4int Function %38 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4int %31 %32 %int_1 ConstOffset %35 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureGather_7c3828 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_7c3828 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_7c3828 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_7c3828 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_7c3828 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_7c3828 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl index 70760c99bc..f5e18b3d25 100644 --- a/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/7c3828.wgsl.expected.wgsl @@ -4,8 +4,8 @@ fn textureGather_7c3828() { const arg_0 = 1i; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.0f); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl index b781710843..816965aff7 100644 --- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl +++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_7dd226() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl index 13f7566cd8..54411be05e 100644 --- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_7dd226() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl index 13f7566cd8..54411be05e 100644 --- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_7dd226() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float4 res = arg_0.Gather(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl index 1c7b39b765..c0b2d12d88 100644 --- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_7dd226(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm index dc42b14bd5..d10d883014 100644 --- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,58 +46,59 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpTypeFunction %v4float %textureGather_7dd226 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - %29 = OpLoad %14 %arg_1 - %30 = OpLoad %11 %arg_0 - %32 = OpSampledImage %31 %30 %29 - %33 = OpLoad %v3float %arg_2 - %34 = OpCompositeExtract %float %33 0 - %35 = OpCompositeExtract %float %33 1 - %36 = OpCompositeExtract %float %33 2 - %38 = OpLoad %uint %arg_3 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v4float %34 %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_0 - OpStore %res %28 + %31 = OpLoad %14 %arg_1 + %32 = OpLoad %11 %arg_0 + %34 = OpSampledImage %33 %32 %31 + %35 = OpLoad %v3float %arg_2 + %36 = OpCompositeExtract %float %35 0 + %37 = OpCompositeExtract %float %35 1 + %38 = OpCompositeExtract %float %35 2 + %40 = OpLoad %uint %arg_3 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_7dd226 +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_7dd226 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_7dd226 + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_7dd226 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_7dd226 + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_7dd226 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl index 0e0eb906e8..1b1c20d54e 100644 --- a/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/7dd226.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_7dd226() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl index 1134019747..dabcb5b285 100644 --- a/test/tint/builtins/gen/var/textureGather/829357.wgsl +++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_829357() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl index 77abe9b233..88ad7f2a62 100644 --- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_829357() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl index 77abe9b233..88ad7f2a62 100644 --- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_829357() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl index 89c6bfb113..655411d508 100644 --- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_829357(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint arg_4 = 1u; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm index 1427357eea..ef7e6f1ba9 100644 --- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,58 +46,59 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpTypeFunction %v4float %textureGather_829357 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %uint_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %33 = OpLoad %v3float %arg_3 - %34 = OpCompositeExtract %float %33 0 - %35 = OpCompositeExtract %float %33 1 - %36 = OpCompositeExtract %float %33 2 - %38 = OpLoad %uint %arg_4 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v4float %34 %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %35 = OpLoad %v3float %arg_3 + %36 = OpCompositeExtract %float %35 0 + %37 = OpCompositeExtract %float %35 1 + %38 = OpCompositeExtract %float %35 2 + %40 = OpLoad %uint %arg_4 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_829357 +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_829357 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_829357 + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_829357 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_829357 + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_829357 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl index 78f4e36850..bd4c6caa0e 100644 --- a/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/829357.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_829357() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl index 1f3118de58..28ca6b3619 100644 --- a/test/tint/builtins/gen/var/textureGather/831549.wgsl +++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_831549() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl index 38bf7e0208..2e103a4b9e 100644 --- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_831549() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl index 38bf7e0208..2e103a4b9e 100644 --- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_831549() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl index 88bf13e6de..b10b9e128f 100644 --- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_831549() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + vec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl index f6e10eb509..d2fade6a5b 100644 --- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_831549(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm index 6ac5d5903d..50095f758e 100644 --- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,60 +45,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %43 = OpConstantNull %v2int + %45 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureGather_831549 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %int_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %int %arg_4 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %uint_1 ConstOffset %43 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %int %arg_4 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %uint_1 ConstOffset %45 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_831549 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_831549 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_831549 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_831549 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_831549 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_831549 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl index fb01440090..030f293a4e 100644 --- a/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/831549.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_831549() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl index 44ac499d47..2008876558 100644 --- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl +++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_8578bc() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl index 58ad0bd4be..422ee4440c 100644 --- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8578bc() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl index 58ad0bd4be..422ee4440c 100644 --- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8578bc() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl index e802a9cc78..ec01ea872b 100644 --- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_8578bc(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint arg_4 = 1u; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm index 2c1c930a42..b7623151ba 100644 --- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,56 +46,57 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %42 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %44 = OpTypeFunction %v4float %textureGather_8578bc = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %uint_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %33 = OpLoad %v3float %arg_3 - %34 = OpCompositeExtract %float %33 0 - %35 = OpCompositeExtract %float %33 1 - %36 = OpCompositeExtract %float %33 2 - %38 = OpLoad %uint %arg_4 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v4float %34 %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %uint_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %35 = OpLoad %v3float %arg_3 + %36 = OpCompositeExtract %float %35 0 + %37 = OpCompositeExtract %float %35 1 + %38 = OpCompositeExtract %float %35 2 + %40 = OpLoad %uint %arg_4 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_8578bc +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_8578bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureGather_8578bc + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_8578bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_8578bc + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_8578bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl index 9a4dd4c7b0..069acaf743 100644 --- a/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/8578bc.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_8578bc() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl index c94c858036..494bd1ba9f 100644 --- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl +++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureGather_89680f() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl index a6d386cc30..c3e709aff2 100644 --- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_89680f() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl index a6d386cc30..c3e709aff2 100644 --- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_89680f() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl index 6f98fe045f..67bb598048 100644 --- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -43,7 +43,7 @@ void main() { uniform highp usamplerCube arg_1_arg_2; void textureGather_89680f() { - vec3 arg_3 = vec3(0.0f); + vec3 arg_3 = vec3(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl index e71f745c4e..36685163ca 100644 --- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_89680f(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm index 700a3d019f..8b47c7d3c6 100644 --- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,47 +45,48 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %v4uint = OpTypeVector %uint 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4uint + %37 = OpTypeFunction %v4float %textureGather_89680f = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %res = OpVariable %_ptr_Function_v4uint Function %34 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v3float %arg_3 - %24 = OpImageGather %v4uint %29 %30 %uint_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %36 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_3 + %26 = OpImageGather %v4uint %31 %32 %uint_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_89680f +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_89680f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_89680f + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_89680f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_89680f + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_89680f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl index 47f8180b54..63c1ad05cf 100644 --- a/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/89680f.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_89680f() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl index 6fe4a5edd8..32c4e98d60 100644 --- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl +++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_8b754c() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl index 52dcf0fa89..c0256e6245 100644 --- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8b754c() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl index 52dcf0fa89..c0256e6245 100644 --- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8b754c() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl index b7a690a28e..19a3f9fcc3 100644 --- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -45,7 +45,7 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_8b754c() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; ivec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.msl index 171f733930..9ac663426f 100644 --- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_8b754c(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm index 09b943b8b0..2ffe76a730 100644 --- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,57 +46,58 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %43 = OpConstantNull %v4int - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %45 = OpConstantNull %v4int + %46 = OpTypeFunction %v4float %textureGather_8b754c = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %27 - %res = OpVariable %_ptr_Function_v4int Function %43 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %45 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %int %arg_4 - %38 = OpConvertSToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4int %33 %40 %int_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %int %arg_4 + %40 = OpConvertSToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4int %35 %42 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_8b754c +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_8b754c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_8b754c + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_8b754c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_8b754c + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_8b754c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl index bc214ebdff..a997540728 100644 --- a/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/8b754c.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_8b754c() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl index 0821f74c3f..e78eabd5ff 100644 --- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl +++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_8fae00() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl index 4f75e2979b..3e180aa1b8 100644 --- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8fae00() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl index 4f75e2979b..3e180aa1b8 100644 --- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_8fae00() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl index f787c2e9ef..199a44220e 100644 --- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -43,7 +43,7 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_8fae00() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uvec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl index 55b262f305..21e063a296 100644 --- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_8fae00(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm index 1739fb4e6e..90e339109b 100644 --- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,47 +45,48 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4uint = OpTypeVector %uint 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %34 = OpConstantNull %v4uint - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4uint + %37 = OpTypeFunction %v4float %textureGather_8fae00 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4uint Function %34 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4uint %29 %30 %uint_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %36 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4uint %31 %32 %uint_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_8fae00 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_8fae00 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_8fae00 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_8fae00 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_8fae00 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_8fae00 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl index 69490b4723..f661061433 100644 --- a/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/8fae00.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_8fae00() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl index eea4da2069..9eed5cbae2 100644 --- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl +++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_92ea47() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl index caaf8b47cf..e90476dd29 100644 --- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_92ea47() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl index caaf8b47cf..e90476dd29 100644 --- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_92ea47() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl index 6004232f43..fa764dd711 100644 --- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -45,7 +45,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_92ea47() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.msl index b733157190..17a6210e6e 100644 --- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_92ea47(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm index 150621f642..72535f44ef 100644 --- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,59 +46,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %28 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %45 = OpConstantNull %v4uint - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4uint + %48 = OpTypeFunction %v4float %textureGather_92ea47 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %28 - %res = OpVariable %_ptr_Function_v4uint Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_4 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4uint %34 %41 %uint_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_4 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4uint %36 %43 %uint_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_92ea47 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_92ea47 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_92ea47 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_92ea47 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_92ea47 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_92ea47 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl index c528d46082..435dfab5db 100644 --- a/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/92ea47.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_92ea47() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl index 86df23bb6d..7e468beff7 100644 --- a/test/tint/builtins/gen/var/textureGather/986700.wgsl +++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl @@ -26,8 +26,8 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_986700() { const arg_0 = 1u; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.f); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl index 740ed2b4e2..ec8491d005 100644 --- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_986700() { - float2 arg_3 = (0.0f).xx; - uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl index 740ed2b4e2..ec8491d005 100644 --- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_986700() { - float2 arg_3 = (0.0f).xx; - uint4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + uint4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl index 10921e572d..b3055595ac 100644 --- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.glsl @@ -3,8 +3,8 @@ uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - vec2 arg_3 = vec2(0.0f); - uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -26,8 +26,8 @@ precision mediump float; uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - vec2 arg_3 = vec2(0.0f); - uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } void fragment_main() { @@ -43,8 +43,8 @@ void main() { uniform highp usampler2D arg_1_arg_2; void textureGather_986700() { - vec2 arg_3 = vec2(0.0f); - uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + uvec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl index 024eebb2ba..0b9c5e15a4 100644 --- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureGather_986700(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); - uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); + float2 arg_3 = float2(1.0f); + uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm index cca05f3d5c..a2f647e3d6 100644 --- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,50 +45,52 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4uint = OpTypeVector %uint 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %37 = OpConstantNull %v4uint - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpConstantNull %v4uint + %41 = OpTypeFunction %v4float %textureGather_986700 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4uint Function %37 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4uint %29 %30 %uint_1 ConstOffset %34 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %40 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4uint %31 %32 %uint_1 ConstOffset %37 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_986700 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_986700 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_986700 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_986700 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_986700 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_986700 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl index eb8526eb1a..f9aa332544 100644 --- a/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/986700.wgsl.expected.wgsl @@ -4,8 +4,8 @@ fn textureGather_986700() { const arg_0 = 1u; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.0f); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl index 48f44fa517..a2209d5c02 100644 --- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl +++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl @@ -25,7 +25,7 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureGather_9a6358() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl index 00950b5ffd..5d3990eb09 100644 --- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_9a6358() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl index 00950b5ffd..5d3990eb09 100644 --- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_9a6358() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl index f535b11110..1f7d85ff1c 100644 --- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_9a6358() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0); } diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.msl index 0b4f909995..82bd61381f 100644 --- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_9a6358(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm index 96ae32ce24..fac5ae5d70 100644 --- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,57 +45,58 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int_0 = OpConstant %int 0 %_ptr_Function_v4float = OpTypePointer Function %v4float - %43 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %45 = OpTypeFunction %v4float %textureGather_9a6358 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - %29 = OpLoad %14 %arg_1 - %30 = OpLoad %11 %arg_0 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_2 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %int %arg_3 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_0 - OpStore %res %28 + %31 = OpLoad %14 %arg_1 + %32 = OpLoad %11 %arg_0 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_2 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %int %arg_3 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_9a6358 +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_9a6358 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %52 = OpLabel - %53 = OpFunctionCall %void %textureGather_9a6358 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGather_9a6358 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_9a6358 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_9a6358 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl index 7d85b1ba8a..934aa855b2 100644 --- a/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/9a6358.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_9a6358() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl index ea1369d075..2d5a787f04 100644 --- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl +++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_9ab41e() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl index 898324f316..4c172c5b2e 100644 --- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_9ab41e() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl index 898324f316..4c172c5b2e 100644 --- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_9ab41e() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl index 4dfab1993e..6035dda690 100644 --- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_9ab41e() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl index 70bf095fa9..cf0143c9be 100644 --- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_9ab41e(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; - int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm index b3b751b885..5bd290e052 100644 --- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,61 +46,62 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %44 = OpConstantNull %v2int + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %47 = OpConstantNull %v4int - %48 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %49 = OpConstantNull %v4int + %50 = OpTypeFunction %v4float %textureGather_9ab41e = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %27 - %res = OpVariable %_ptr_Function_v4int Function %47 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %49 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %int %arg_4 - %38 = OpConvertSToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4int %33 %40 %uint_1 ConstOffset %44 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %int %arg_4 + %40 = OpConvertSToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4int %35 %42 %uint_1 ConstOffset %46 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_9ab41e +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_9ab41e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_9ab41e + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_9ab41e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %60 = OpLabel - %61 = OpFunctionCall %void %textureGather_9ab41e + %61 = OpLabel + %62 = OpFunctionCall %void %textureGather_9ab41e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl index 8a0dad63bd..5dba0284da 100644 --- a/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/9ab41e.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_9ab41e() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl index d6aedbadec..62f713bf0f 100644 --- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl +++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_a0372b() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl index fb8e7d5ccd..d55d5b2e4c 100644 --- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_a0372b() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl index fb8e7d5ccd..d55d5b2e4c 100644 --- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_a0372b() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl index c9010570df..937464cc9e 100644 --- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } @@ -45,7 +45,7 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_a0372b() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; uvec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), 1); } diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl index 7a6f23d0d6..6b012edc1f 100644 --- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_a0372b(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm index d884cab2fd..36d654744d 100644 --- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,59 +46,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %45 = OpConstantNull %v4uint - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4uint + %48 = OpTypeFunction %v4float %textureGather_a0372b = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 - %res = OpVariable %_ptr_Function_v4uint Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %uint %arg_4 - %38 = OpConvertUToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4uint %33 %40 %int_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %uint %arg_4 + %40 = OpConvertUToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4uint %35 %42 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_a0372b +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_a0372b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_a0372b + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_a0372b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_a0372b + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_a0372b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl index 2daaad726f..e4b97a29e1 100644 --- a/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/a0372b.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_a0372b() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl index f58770c610..d18ba4f716 100644 --- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl +++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl @@ -25,9 +25,9 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_a68027() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl index 97ae67b409..d716bd523e 100644 --- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_a68027() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl index 97ae67b409..d716bd523e 100644 --- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_a68027() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl index 24ac721573..685e54f4f2 100644 --- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_a68027() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl index 6584b67846..1e36abdecf 100644 --- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_a68027(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm index a0830eab3e..6fe0fae29c 100644 --- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 62 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,60 +45,62 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %43 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %49 = OpTypeFunction %v4float %textureGather_a68027 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - %29 = OpLoad %14 %arg_1 - %30 = OpLoad %11 %arg_0 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_2 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %uint %arg_3 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_0 ConstOffset %43 - OpStore %res %28 + %31 = OpLoad %14 %arg_1 + %32 = OpLoad %11 %arg_0 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_2 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %uint %arg_3 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_0 ConstOffset %46 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_a68027 +%vertex_main_inner = OpFunction %v4float None %49 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_a68027 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %54 = OpLabel + %55 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %55 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_a68027 + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_a68027 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_a68027 + %60 = OpLabel + %61 = OpFunctionCall %void %textureGather_a68027 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl index f7aa73b72a..7806795903 100644 --- a/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/a68027.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_a68027() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl index 640fa29e8a..4e511c9c43 100644 --- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl +++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_aaf6bd() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl index ff59e8270b..c9ad4327b1 100644 --- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_aaf6bd() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl index ff59e8270b..c9ad4327b1 100644 --- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_aaf6bd() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.msl index 51280df4f3..4a1771a4be 100644 --- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_aaf6bd(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int arg_4 = 1; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm index b4296f0818..b02612c25e 100644 --- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,59 +47,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %45 = OpConstantNull %v4int - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4int + %48 = OpTypeFunction %v4float %textureGather_aaf6bd = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %27 - %res = OpVariable %_ptr_Function_v4int Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v3float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %37 = OpCompositeExtract %float %34 2 - %39 = OpLoad %int %arg_4 - %38 = OpConvertSToF %float %39 - %40 = OpCompositeConstruct %v4float %35 %36 %37 %38 - %28 = OpImageGather %v4int %33 %40 %uint_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v3float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %39 = OpCompositeExtract %float %36 2 + %41 = OpLoad %int %arg_4 + %40 = OpConvertSToF %float %41 + %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 + %30 = OpImageGather %v4int %35 %42 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_aaf6bd +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_aaf6bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_aaf6bd + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_aaf6bd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_aaf6bd + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_aaf6bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl index 957219fd2d..751573221f 100644 --- a/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/aaf6bd.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_aaf6bd() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl index fe080844f0..0a0d4e0790 100644 --- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl +++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl @@ -26,8 +26,8 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_af55b3() { const arg_0 = 1i; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.f); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl index 2cf56d1ba9..004bf3e178 100644 --- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_af55b3() { - float2 arg_3 = (0.0f).xx; - float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl index 2cf56d1ba9..004bf3e178 100644 --- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_af55b3() { - float2 arg_3 = (0.0f).xx; - float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl index ec46313269..f487bf8cd6 100644 --- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.glsl @@ -3,8 +3,8 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec2 arg_3 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } vec4 vertex_main() { @@ -26,8 +26,8 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec2 arg_3 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } void fragment_main() { @@ -43,8 +43,8 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_af55b3() { - vec2 arg_3 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), 1); + vec2 arg_3 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl index 5bdf570683..c60b757f26 100644 --- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureGather_af55b3(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); + float2 arg_3 = float2(1.0f); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.spvasm index 7bb9edcb23..1cf4833e48 100644 --- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,48 +44,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v2float + %28 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %32 = OpConstantNull %v2int + %34 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpTypeFunction %v4float %textureGather_af55b3 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 - %24 = OpLoad %14 %arg_2 - %25 = OpLoad %11 %arg_1 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v2float %arg_3 - %23 = OpImageGather %v4float %27 %28 %int_1 ConstOffset %32 - OpStore %res %23 + OpStore %arg_3 %21 + %26 = OpLoad %14 %arg_2 + %27 = OpLoad %11 %arg_1 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v2float %arg_3 + %25 = OpImageGather %v4float %29 %30 %int_1 ConstOffset %34 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_af55b3 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_af55b3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_af55b3 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_af55b3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_af55b3 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_af55b3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl index 027213b636..ece4d4939c 100644 --- a/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/af55b3.wgsl.expected.wgsl @@ -4,8 +4,8 @@ fn textureGather_af55b3() { const arg_0 = 1i; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.0f); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl index 1d90408e97..4cdc94612e 100644 --- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl +++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_bb3ac5() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl index 2f718f3661..bf01188f12 100644 --- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bb3ac5() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl index 2f718f3661..bf01188f12 100644 --- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bb3ac5() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl index 0c9b449c4f..eac794aa98 100644 --- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, 1); } @@ -43,7 +43,7 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_bb3ac5() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, 1); } diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.msl index 99c8768564..4fc6aef47a 100644 --- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_bb3ac5(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.spvasm index 0d15df0fda..a9d8e0de44 100644 --- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,47 +45,48 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4int = OpTypeVector %int 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int_1 = OpConstant %int 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %34 = OpConstantNull %v4int - %35 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %36 = OpConstantNull %v4int + %37 = OpTypeFunction %v4float %textureGather_bb3ac5 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4int Function %34 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4int %29 %30 %int_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4int Function %36 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4int %31 %32 %int_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGather_bb3ac5 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureGather_bb3ac5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_bb3ac5 + %45 = OpLabel + %46 = OpFunctionCall %void %textureGather_bb3ac5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_bb3ac5 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_bb3ac5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl index 495e907b48..790a3162c7 100644 --- a/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/bb3ac5.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_bb3ac5() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl index 12963b58c1..c401a2d1cf 100644 --- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl +++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_bd33b6() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl index dd45876691..cc7da20015 100644 --- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bd33b6() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl index dd45876691..cc7da20015 100644 --- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_bd33b6() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl index 7afb7c6317..e8a0d0f15e 100644 --- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_bd33b6() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl index 7453f3152a..becd9cbf4e 100644 --- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_bd33b6(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; - int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm index 53a9d9916f..985c152ac6 100644 --- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,61 +46,62 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %28 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %44 = OpConstantNull %v2int + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %47 = OpConstantNull %v4int - %48 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %49 = OpConstantNull %v4int + %50 = OpTypeFunction %v4float %textureGather_bd33b6 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %28 - %res = OpVariable %_ptr_Function_v4int Function %47 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %49 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_4 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4int %34 %41 %int_1 ConstOffset %44 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_4 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4int %36 %43 %int_1 ConstOffset %46 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_bd33b6 +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_bd33b6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_bd33b6 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_bd33b6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %60 = OpLabel - %61 = OpFunctionCall %void %textureGather_bd33b6 + %61 = OpLabel + %62 = OpFunctionCall %void %textureGather_bd33b6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl index e0a3f4d712..9e313acfb4 100644 --- a/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/bd33b6.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_bd33b6() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl index 982306141b..c370be7731 100644 --- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl +++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_be276f() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl index 076da2ba11..a14fbfd8f1 100644 --- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_be276f() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl index 076da2ba11..a14fbfd8f1 100644 --- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_be276f() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl index 537029ed5a..06425181ef 100644 --- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_be276f(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint arg_4 = 1u; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm index 10fb0ee80e..e16c672fce 100644 --- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,59 +47,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %45 = OpConstantNull %v4uint - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4uint + %48 = OpTypeFunction %v4float %textureGather_be276f = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 - %res = OpVariable %_ptr_Function_v4uint Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v3float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %37 = OpCompositeExtract %float %34 2 - %39 = OpLoad %uint %arg_4 - %38 = OpConvertUToF %float %39 - %40 = OpCompositeConstruct %v4float %35 %36 %37 %38 - %28 = OpImageGather %v4uint %33 %40 %int_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v3float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %39 = OpCompositeExtract %float %36 2 + %41 = OpLoad %uint %arg_4 + %40 = OpConvertUToF %float %41 + %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 + %30 = OpImageGather %v4uint %35 %42 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_be276f +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_be276f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_be276f + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_be276f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_be276f + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_be276f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl index ba4234a5de..91f83dd573 100644 --- a/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/be276f.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_be276f() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl index 4cf7792b1b..4c2d2b2506 100644 --- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl +++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_c0640c() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl index 76b208b9f9..74d182b0aa 100644 --- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_c0640c() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl index 76b208b9f9..74d182b0aa 100644 --- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_c0640c() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; int4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.msl index 9e5a33ba67..4514dbc95d 100644 --- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_c0640c(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int arg_4 = 1; int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm index 1a0206bfb9..a404b034d3 100644 --- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,57 +47,58 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %_ptr_Function_v4int = OpTypePointer Function %v4int - %43 = OpConstantNull %v4int - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %45 = OpConstantNull %v4int + %46 = OpTypeFunction %v4float %textureGather_c0640c = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %27 - %res = OpVariable %_ptr_Function_v4int Function %43 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %45 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v3float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %37 = OpCompositeExtract %float %34 2 - %39 = OpLoad %int %arg_4 - %38 = OpConvertSToF %float %39 - %40 = OpCompositeConstruct %v4float %35 %36 %37 %38 - %28 = OpImageGather %v4int %33 %40 %int_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v3float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %39 = OpCompositeExtract %float %36 2 + %41 = OpLoad %int %arg_4 + %40 = OpConvertSToF %float %41 + %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 + %30 = OpImageGather %v4int %35 %42 %int_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_c0640c +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_c0640c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_c0640c + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_c0640c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_c0640c + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_c0640c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl index eae1f9a56c..3372a4de9c 100644 --- a/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/c0640c.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_c0640c() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl index d841c27f2e..4a66e7255a 100644 --- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl +++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_ccadde() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl index 1b760a5ff4..48f27defda 100644 --- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ccadde() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl index 1b760a5ff4..48f27defda 100644 --- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ccadde() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl index 5268f1fb39..d2d56a90e1 100644 --- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -43,7 +43,7 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_ccadde() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); ivec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl index 47a6567856..6b81fe0031 100644 --- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_ccadde(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm index e8acb0bc98..55ebe0d47e 100644 --- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 51 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4int = OpTypeVector %int 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %35 = OpConstantNull %v4int - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %37 = OpConstantNull %v4int + %38 = OpTypeFunction %v4float %textureGather_ccadde = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4int Function %35 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4int %29 %30 %uint_1 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4int Function %37 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4int %31 %32 %uint_1 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_ccadde +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureGather_ccadde OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_ccadde + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_ccadde OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_ccadde + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_ccadde OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl index 15cdbb409f..509edb3100 100644 --- a/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/ccadde.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_ccadde() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl index 156d1eca49..e2d08b2cef 100644 --- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl +++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_ce5578() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl index 7df33eeb42..4ab074dbe9 100644 --- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ce5578() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl index 7df33eeb42..4ab074dbe9 100644 --- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ce5578() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl index a7825b7b04..360f4fbb67 100644 --- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_ce5578() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl index 14a5c037da..b2f8c74787 100644 --- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_ce5578(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; - uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm index aec41cc0be..4bfdca5c00 100644 --- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,61 +46,62 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %v2int = OpTypeVector %int 2 - %44 = OpConstantNull %v2int + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %47 = OpConstantNull %v4uint - %48 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %49 = OpConstantNull %v4uint + %50 = OpTypeFunction %v4float %textureGather_ce5578 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 - %res = OpVariable %_ptr_Function_v4uint Function %47 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %49 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %uint %arg_4 - %38 = OpConvertUToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4uint %33 %40 %int_1 ConstOffset %44 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %uint %arg_4 + %40 = OpConvertUToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4uint %35 %42 %int_1 ConstOffset %46 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_ce5578 +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_ce5578 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_ce5578 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_ce5578 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %60 = OpLabel - %61 = OpFunctionCall %void %textureGather_ce5578 + %61 = OpLabel + %62 = OpFunctionCall %void %textureGather_ce5578 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl index f936734857..27f3c1cfe6 100644 --- a/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/ce5578.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_ce5578() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl index bd3e4dfd4d..4c0baafacc 100644 --- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl +++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureGather_cf9112() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl index cefff93a4e..59c08dc1c0 100644 --- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_cf9112() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl index cefff93a4e..59c08dc1c0 100644 --- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_cf9112() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl index 60d154e4c2..71a71e09ed 100644 --- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_cf9112() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl index 0d762a76ca..36494a432e 100644 --- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_cf9112(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; - int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm index 05debe8e88..488b0e1cc6 100644 --- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 61 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,62 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %28 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %43 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %46 = OpConstantNull %v4int - %47 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %49 = OpConstantNull %v4int + %50 = OpTypeFunction %v4float %textureGather_cf9112 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %28 - %res = OpVariable %_ptr_Function_v4int Function %46 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %49 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_4 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4int %34 %41 %uint_1 ConstOffset %43 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_4 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4int %36 %43 %uint_1 ConstOffset %46 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %47 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_cf9112 +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_cf9112 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %52 = OpLabel - %53 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %53 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_cf9112 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_cf9112 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %59 = OpLabel - %60 = OpFunctionCall %void %textureGather_cf9112 + %61 = OpLabel + %62 = OpFunctionCall %void %textureGather_cf9112 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl index ac3035b16c..299140916c 100644 --- a/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/cf9112.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_cf9112() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl index 81533b289d..305f819b4a 100644 --- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_d1f187() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl index 6fdf9e4239..f7f38339ee 100644 --- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d1f187() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl index 6fdf9e4239..f7f38339ee 100644 --- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d1f187() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl index cf015a2672..263148081a 100644 --- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_d1f187() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl index a2e3383148..29eda44dcf 100644 --- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_d1f187(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; - uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm index f88d541acb..fece5f4102 100644 --- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 61 +; Bound: 62 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,61 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %28 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %43 = OpConstantNull %v2int + %45 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %46 = OpConstantNull %v4uint - %47 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpConstantNull %v4uint + %49 = OpTypeFunction %v4float %textureGather_d1f187 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %28 - %res = OpVariable %_ptr_Function_v4uint Function %46 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %48 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_4 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4uint %34 %41 %int_1 ConstOffset %43 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_4 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4uint %36 %43 %int_1 ConstOffset %45 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %47 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGather_d1f187 +%vertex_main_inner = OpFunction %v4float None %49 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGather_d1f187 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %52 = OpLabel - %53 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %53 + %54 = OpLabel + %55 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %55 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_d1f187 + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_d1f187 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %59 = OpLabel - %60 = OpFunctionCall %void %textureGather_d1f187 + %60 = OpLabel + %61 = OpFunctionCall %void %textureGather_d1f187 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl index c7522daeda..f00540322b 100644 --- a/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d1f187.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_d1f187() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl index 25afe4a355..bd6a18228a 100644 --- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_d4b5c6() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl index f8af2587d9..1790e9eb27 100644 --- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d4b5c6() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl index f8af2587d9..1790e9eb27 100644 --- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d4b5c6() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.msl index ad72e15bdf..110ba985f9 100644 --- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d4b5c6(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int arg_4 = 1; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm index 33772f0194..2e65d3aab3 100644 --- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,59 +47,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %28 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %45 = OpConstantNull %v4uint - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4uint + %48 = OpTypeFunction %v4float %textureGather_d4b5c6 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %28 - %res = OpVariable %_ptr_Function_v4uint Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %int %arg_4 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %29 = OpImageGather %v4uint %34 %41 %uint_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %int %arg_4 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %31 = OpImageGather %v4uint %36 %43 %uint_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_d4b5c6 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_d4b5c6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_d4b5c6 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_d4b5c6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_d4b5c6 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_d4b5c6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl index 9b394bb064..573afe71e9 100644 --- a/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d4b5c6.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_d4b5c6() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl index 529a2b4358..667dc526f3 100644 --- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl @@ -26,8 +26,8 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_d6507c() { const arg_0 = 1u; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.f); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl index 158dc3c481..7075df491e 100644 --- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d6507c() { - float2 arg_3 = (0.0f).xx; - float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl index 158dc3c481..7075df491e 100644 --- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d6507c() { - float2 arg_3 = (0.0f).xx; - float4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + float4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl index 493bc749e2..4226409320 100644 --- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.glsl @@ -3,8 +3,8 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec2 arg_3 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -26,8 +26,8 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec2 arg_3 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } void fragment_main() { @@ -43,8 +43,8 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_d6507c() { - vec2 arg_3 = vec2(0.0f); - vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + vec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl index 2a6abf0e61..c9b6de0ec4 100644 --- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureGather_d6507c(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); + float2 arg_3 = float2(1.0f); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm index 6ea4db6467..f73987d752 100644 --- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,49 +44,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v2float + %28 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %33 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %36 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureGather_d6507c = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 - %24 = OpLoad %14 %arg_2 - %25 = OpLoad %11 %arg_1 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v2float %arg_3 - %23 = OpImageGather %v4float %27 %28 %uint_1 ConstOffset %33 - OpStore %res %23 + OpStore %arg_3 %21 + %26 = OpLoad %14 %arg_2 + %27 = OpLoad %11 %arg_1 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v2float %arg_3 + %25 = OpImageGather %v4float %29 %30 %uint_1 ConstOffset %36 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureGather_d6507c +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureGather_d6507c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_d6507c + %47 = OpLabel + %48 = OpFunctionCall %void %textureGather_d6507c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_d6507c + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_d6507c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl index 97e61e96b5..392cf96658 100644 --- a/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d6507c.wgsl.expected.wgsl @@ -4,8 +4,8 @@ fn textureGather_d6507c() { const arg_0 = 1u; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.0f); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl index c9d9eac8c6..0908c1f3f2 100644 --- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureGather_d8e958() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl index 03635a4bbe..9160d0b36d 100644 --- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d8e958() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl index 03635a4bbe..9160d0b36d 100644 --- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d8e958() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; float4 res = arg_1.GatherGreen(arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl index ec027e7307..1cfc5db583 100644 --- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } @@ -43,7 +43,7 @@ void main() { uniform highp sampler2D arg_1_arg_2; void textureGather_d8e958() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); vec4 res = textureGather(arg_1_arg_2, arg_3, int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl index 0cf129f232..463582b4e9 100644 --- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d8e958(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm index 3800a97181..0e48fa291f 100644 --- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -44,46 +44,47 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %26 = OpTypeSampledImage %11 + %24 = OpConstantNull %v2float + %28 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %35 = OpTypeFunction %v4float %textureGather_d8e958 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 - %24 = OpLoad %14 %arg_2 - %25 = OpLoad %11 %arg_1 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v2float %arg_3 - %23 = OpImageGather %v4float %27 %28 %uint_1 - OpStore %res %23 + OpStore %arg_3 %21 + %26 = OpLoad %14 %arg_2 + %27 = OpLoad %11 %arg_1 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v2float %arg_3 + %25 = OpImageGather %v4float %29 %30 %uint_1 + OpStore %res %25 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureGather_d8e958 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureGather_d8e958 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %42 = OpLabel - %43 = OpFunctionCall %void %textureGather_d8e958 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_d8e958 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %45 = OpLabel - %46 = OpFunctionCall %void %textureGather_d8e958 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_d8e958 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl index f4776fb4c8..7abc15a049 100644 --- a/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d8e958.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_d8e958() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl index 5e9106bb22..4aed3ac5dc 100644 --- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl @@ -25,9 +25,9 @@ // fn textureGather(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_d90605() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl index 961f7f3b57..2ea2c41049 100644 --- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_d90605() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl index 961f7f3b57..2ea2c41049 100644 --- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureGather_d90605() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Gather(arg_1, float3(arg_2, float(arg_3)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl index 698dd66a03..f83b545594 100644 --- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGather_d90605() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), 0.0, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl index b5074d22c5..e27f2f7cfc 100644 --- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_d90605(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; - float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(0)); + float4 res = tint_symbol_1.gather(tint_symbol_2, arg_2, arg_3, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm index 2c1da3faf7..986755692f 100644 --- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,59 +45,60 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int_0 = OpConstant %int 0 %v2int = OpTypeVector %int 2 - %42 = OpConstantNull %v2int + %44 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %45 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpTypeFunction %v4float %textureGather_d90605 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - %29 = OpLoad %14 %arg_1 - %30 = OpLoad %11 %arg_0 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_2 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %int %arg_3 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %int_0 ConstOffset %42 - OpStore %res %28 + %31 = OpLoad %14 %arg_1 + %32 = OpLoad %11 %arg_0 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_2 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %int %arg_3 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %int_0 ConstOffset %44 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_d90605 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_d90605 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_d90605 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_d90605 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_d90605 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_d90605 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl index 32f00b370b..a24fe408e2 100644 --- a/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d90605.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureGather_d90605() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl index e4e7524655..c1c9e727ba 100644 --- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_d98d59() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl index 5636e11e79..68e7ca4a07 100644 --- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d98d59() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl index 5636e11e79..68e7ca4a07 100644 --- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_d98d59() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; float4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.msl index b764f21008..4d7e894635 100644 --- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_d98d59(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int arg_4 = 1; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm index eb9a8abcc0..d2be53c526 100644 --- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -46,58 +46,59 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %33 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpTypeFunction %v4float %textureGather_d98d59 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %int_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %33 = OpLoad %v3float %arg_3 - %34 = OpCompositeExtract %float %33 0 - %35 = OpCompositeExtract %float %33 1 - %36 = OpCompositeExtract %float %33 2 - %38 = OpLoad %int %arg_4 - %37 = OpConvertSToF %float %38 - %39 = OpCompositeConstruct %v4float %34 %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %uint_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %35 = OpLoad %v3float %arg_3 + %36 = OpCompositeExtract %float %35 0 + %37 = OpCompositeExtract %float %35 1 + %38 = OpCompositeExtract %float %35 2 + %40 = OpLoad %int %arg_4 + %39 = OpConvertSToF %float %40 + %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_d98d59 +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_d98d59 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_d98d59 + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_d98d59 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_d98d59 + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_d98d59 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl index dc7f8c7bb8..fb91e26e81 100644 --- a/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/d98d59.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_d98d59() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl index b51c3e56c9..365b22fb09 100644 --- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl +++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl @@ -26,8 +26,8 @@ // fn textureGather(@const component: u32, texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureGather_dc6661() { const arg_0 = 1u; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.f); + const arg_4 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl index 0fc31acb62..3c686c6866 100644 --- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_dc6661() { - float2 arg_3 = (0.0f).xx; - int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl index 0fc31acb62..3c686c6866 100644 --- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_dc6661() { - float2 arg_3 = (0.0f).xx; - int4 res = arg_1.GatherGreen(arg_2, arg_3, (0).xx); + float2 arg_3 = (1.0f).xx; + int4 res = arg_1.GatherGreen(arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl index 98f224d441..4c66cb9db8 100644 --- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.glsl @@ -3,8 +3,8 @@ uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - vec2 arg_3 = vec2(0.0f); - ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } vec4 vertex_main() { @@ -26,8 +26,8 @@ precision mediump float; uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - vec2 arg_3 = vec2(0.0f); - ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } void fragment_main() { @@ -43,8 +43,8 @@ void main() { uniform highp isampler2D arg_1_arg_2; void textureGather_dc6661() { - vec2 arg_3 = vec2(0.0f); - ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(0), int(1u)); + vec2 arg_3 = vec2(1.0f); + ivec4 res = textureGatherOffset(arg_1_arg_2, arg_3, ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl index 479290e14c..08dd9599a6 100644 --- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureGather_dc6661(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); - int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(0), component::y); + float2 arg_3 = float2(1.0f); + int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm index a6e8142929..0f57540986 100644 --- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,50 +45,52 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %v4int = OpTypeVector %int 4 - %28 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %34 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %37 = OpConstantNull %v4int - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %40 = OpConstantNull %v4int + %41 = OpTypeFunction %v4float %textureGather_dc6661 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %res = OpVariable %_ptr_Function_v4int Function %37 - OpStore %arg_3 %21 - %26 = OpLoad %15 %arg_2 - %27 = OpLoad %11 %arg_1 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_3 - %24 = OpImageGather %v4int %29 %30 %uint_1 ConstOffset %34 - OpStore %res %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %res = OpVariable %_ptr_Function_v4int Function %40 + OpStore %arg_3 %22 + %28 = OpLoad %15 %arg_2 + %29 = OpLoad %11 %arg_1 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_3 + %26 = OpImageGather %v4int %31 %32 %uint_1 ConstOffset %37 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGather_dc6661 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureGather_dc6661 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_dc6661 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_dc6661 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_dc6661 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_dc6661 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl index b6393991f1..8e2e84eacd 100644 --- a/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/dc6661.wgsl.expected.wgsl @@ -4,8 +4,8 @@ fn textureGather_dc6661() { const arg_0 = 1u; - var arg_3 = vec2(); - const arg_4 = vec2(); + var arg_3 = vec2(1.0f); + const arg_4 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl index 6d145fa577..7b40592dcf 100644 --- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl +++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureGather_e2acac() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl index 57cafd47ed..a3242e31ca 100644 --- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e2acac() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl index 57cafd47ed..a3242e31ca 100644 --- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e2acac() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; uint arg_4 = 1u; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl index 1fdaddc4dc..4044a855c7 100644 --- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_e2acac(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); uint arg_4 = 1u; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm index f6a7322155..665055179e 100644 --- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,57 +47,58 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %43 = OpConstantNull %v4uint - %44 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %45 = OpConstantNull %v4uint + %46 = OpTypeFunction %v4float %textureGather_e2acac = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 - %res = OpVariable %_ptr_Function_v4uint Function %43 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 + %res = OpVariable %_ptr_Function_v4uint Function %45 + OpStore %arg_3 %22 OpStore %arg_4 %uint_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v3float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %37 = OpCompositeExtract %float %34 2 - %39 = OpLoad %uint %arg_4 - %38 = OpConvertUToF %float %39 - %40 = OpCompositeConstruct %v4float %35 %36 %37 %38 - %28 = OpImageGather %v4uint %33 %40 %uint_1 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v3float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %39 = OpCompositeExtract %float %36 2 + %41 = OpLoad %uint %arg_4 + %40 = OpConvertUToF %float %41 + %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 + %30 = OpImageGather %v4uint %35 %42 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGather_e2acac +%vertex_main_inner = OpFunction %v4float None %46 + %48 = OpLabel + %49 = OpFunctionCall %void %textureGather_e2acac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %51 = OpLabel + %52 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %52 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %void %textureGather_e2acac + %54 = OpLabel + %55 = OpFunctionCall %void %textureGather_e2acac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGather_e2acac + %57 = OpLabel + %58 = OpFunctionCall %void %textureGather_e2acac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl index f3fda107c7..bf9657f8ee 100644 --- a/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/e2acac.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_e2acac() { const arg_0 = 1u; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl index a261325915..145f621001 100644 --- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl +++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_e3165f() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl index 81a031de4f..7d57cba1fb 100644 --- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e3165f() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl index 81a031de4f..7d57cba1fb 100644 --- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e3165f() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + uint4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl index 6239d68f66..e96d0aee83 100644 --- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp usampler2DArray arg_1_arg_2; void textureGather_e3165f() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), int(1u)); + uvec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), int(1u)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl index 89f5559a21..6891befafe 100644 --- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_e3165f(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; - uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm index b246f34ad9..7dd439e78f 100644 --- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,61 +46,62 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %28 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %uint_1 = OpConstant %uint 1 %v2int = OpTypeVector %int 2 - %44 = OpConstantNull %v2int + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %47 = OpConstantNull %v4uint - %48 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %49 = OpConstantNull %v4uint + %50 = OpTypeFunction %v4float %textureGather_e3165f = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %28 - %res = OpVariable %_ptr_Function_v4uint Function %47 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %49 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_3 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_4 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %29 = OpImageGather %v4uint %34 %41 %uint_1 ConstOffset %44 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_3 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_4 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %31 = OpImageGather %v4uint %36 %43 %uint_1 ConstOffset %46 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGather_e3165f +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_e3165f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_e3165f + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_e3165f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %60 = OpLabel - %61 = OpFunctionCall %void %textureGather_e3165f + %61 = OpLabel + %62 = OpFunctionCall %void %textureGather_e3165f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl index 4f62566e8e..2cd2864f1f 100644 --- a/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/e3165f.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_e3165f() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl index 167a0b2aea..c7f277d9ae 100644 --- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl +++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl @@ -26,9 +26,9 @@ // fn textureGather(@const component: i32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureGather_e9d390() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl index 303164a498..0604af74c2 100644 --- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e9d390() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl index 303164a498..0604af74c2 100644 --- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_e9d390() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; int arg_4 = 1; - int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (0).xx); + int4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4)), (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl index 51dbcc162e..9c122b83e8 100644 --- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp isampler2DArray arg_1_arg_2; void textureGather_e9d390() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); int arg_4 = 1; - ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(0), 1); + ivec4 res = textureGatherOffset(arg_1_arg_2, vec3(arg_3, float(arg_4)), ivec2(1), 1); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl index 6d75549436..28ce256b30 100644 --- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGather_e9d390(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); int arg_4 = 1; - int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); + int4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(1), component::y); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm index 0748d70cad..0092cc8ca2 100644 --- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,59 +46,60 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %21 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %25 = OpConstantNull %v2float %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %32 = OpTypeSampledImage %11 + %34 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %42 = OpConstantNull %v2int + %44 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %45 = OpConstantNull %v4int - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %47 = OpConstantNull %v4int + %48 = OpTypeFunction %v4float %textureGather_e9d390 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %27 - %res = OpVariable %_ptr_Function_v4int Function %45 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v2float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %29 + %res = OpVariable %_ptr_Function_v4int Function %47 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %30 = OpLoad %15 %arg_2 - %31 = OpLoad %11 %arg_1 - %33 = OpSampledImage %32 %31 %30 - %35 = OpLoad %v2float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %39 = OpLoad %int %arg_4 - %38 = OpConvertSToF %float %39 - %40 = OpCompositeConstruct %v3float %36 %37 %38 - %28 = OpImageGather %v4int %33 %40 %int_1 ConstOffset %42 - OpStore %res %28 + %32 = OpLoad %15 %arg_2 + %33 = OpLoad %11 %arg_1 + %35 = OpSampledImage %34 %33 %32 + %37 = OpLoad %v2float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %41 = OpLoad %int %arg_4 + %40 = OpConvertSToF %float %41 + %42 = OpCompositeConstruct %v3float %38 %39 %40 + %30 = OpImageGather %v4int %35 %42 %int_1 ConstOffset %44 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGather_e9d390 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureGather_e9d390 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %55 = OpLabel - %56 = OpFunctionCall %void %textureGather_e9d390 + %56 = OpLabel + %57 = OpFunctionCall %void %textureGather_e9d390 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %58 = OpLabel - %59 = OpFunctionCall %void %textureGather_e9d390 + %59 = OpLabel + %60 = OpFunctionCall %void %textureGather_e9d390 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl index 6cf5907719..1f1750b166 100644 --- a/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/e9d390.wgsl.expected.wgsl @@ -4,9 +4,9 @@ fn textureGather_e9d390() { const arg_0 = 1i; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl index dc6250bf72..5e60b91f31 100644 --- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl +++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: u32, texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureGather_ea8eb4() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.f); var arg_4 = 1u; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl index 0759fa569b..a9e5e58bca 100644 --- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ea8eb4() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl index 0759fa569b..a9e5e58bca 100644 --- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_ea8eb4() { - float2 arg_3 = (0.0f).xx; + float2 arg_3 = (1.0f).xx; uint arg_4 = 1u; float4 res = arg_1.GatherGreen(arg_2, float3(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl index 87e62b42dd..5a389b919f 100644 --- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DArray arg_1_arg_2; void textureGather_ea8eb4() { - vec2 arg_3 = vec2(0.0f); + vec2 arg_3 = vec2(1.0f); uint arg_4 = 1u; vec4 res = textureGather(arg_1_arg_2, vec3(arg_3, float(arg_4)), int(1u)); } diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl index 51fd170bcf..5e246ecdf8 100644 --- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_ea8eb4(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_3 = float2(0.0f); + float2 arg_3 = float2(1.0f); uint arg_4 = 1u; float4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, int2(0), component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm index e629bb7169..1b348a410a 100644 --- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,56 +45,57 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %31 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %33 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %42 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %44 = OpTypeFunction %v4float %textureGather_ea8eb4 = OpFunction %void None %15 %18 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_3 %20 + OpStore %arg_3 %21 OpStore %arg_4 %uint_1 - %29 = OpLoad %14 %arg_2 - %30 = OpLoad %11 %arg_1 - %32 = OpSampledImage %31 %30 %29 - %34 = OpLoad %v2float %arg_3 - %35 = OpCompositeExtract %float %34 0 - %36 = OpCompositeExtract %float %34 1 - %38 = OpLoad %uint %arg_4 - %37 = OpConvertUToF %float %38 - %39 = OpCompositeConstruct %v3float %35 %36 %37 - %28 = OpImageGather %v4float %32 %39 %uint_1 - OpStore %res %28 + %31 = OpLoad %14 %arg_2 + %32 = OpLoad %11 %arg_1 + %34 = OpSampledImage %33 %32 %31 + %36 = OpLoad %v2float %arg_3 + %37 = OpCompositeExtract %float %36 0 + %38 = OpCompositeExtract %float %36 1 + %40 = OpLoad %uint %arg_4 + %39 = OpConvertUToF %float %40 + %41 = OpCompositeConstruct %v3float %37 %38 %39 + %30 = OpImageGather %v4float %34 %41 %uint_1 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureGather_ea8eb4 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureGather_ea8eb4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureGather_ea8eb4 + %52 = OpLabel + %53 = OpFunctionCall %void %textureGather_ea8eb4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_ea8eb4 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_ea8eb4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl index 5062f1812d..63fe006792 100644 --- a/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/ea8eb4.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_ea8eb4() { const arg_0 = 1u; - var arg_3 = vec2(); + var arg_3 = vec2(1.0f); var arg_4 = 1u; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl index b1bdb2d92f..4d6a8b4431 100644 --- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl +++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl @@ -26,7 +26,7 @@ // fn textureGather(@const component: i32, texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureGather_f2c6e3() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.f); var arg_4 = 1i; var res: vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl index e7b6ba868b..358b397ef1 100644 --- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_f2c6e3() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl index e7b6ba868b..358b397ef1 100644 --- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_1 : register(t1, space1); SamplerState arg_2 : register(s2, space1); void textureGather_f2c6e3() { - float3 arg_3 = (0.0f).xxx; + float3 arg_3 = (1.0f).xxx; int arg_4 = 1; uint4 res = arg_1.GatherGreen(arg_2, float4(arg_3, float(arg_4))); } diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.msl index 088082f722..b356eb965b 100644 --- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGather_f2c6e3(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_3 = float3(0.0f); + float3 arg_3 = float3(1.0f); int arg_4 = 1; uint4 res = tint_symbol_1.gather(tint_symbol_2, arg_3, arg_4, component::y); } diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm index 2fba92b77f..36837a228c 100644 --- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,58 +47,59 @@ %void = OpTypeVoid %16 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %21 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %25 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %28 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %33 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %44 = OpConstantNull %v4uint - %45 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %46 = OpConstantNull %v4uint + %47 = OpTypeFunction %v4float %textureGather_f2c6e3 = OpFunction %void None %16 %19 = OpLabel - %arg_3 = OpVariable %_ptr_Function_v3float Function %21 - %arg_4 = OpVariable %_ptr_Function_int Function %28 - %res = OpVariable %_ptr_Function_v4uint Function %44 - OpStore %arg_3 %21 + %arg_3 = OpVariable %_ptr_Function_v3float Function %25 + %arg_4 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %46 + OpStore %arg_3 %22 OpStore %arg_4 %int_1 - %31 = OpLoad %15 %arg_2 - %32 = OpLoad %11 %arg_1 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_3 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %int %arg_4 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %29 = OpImageGather %v4uint %34 %41 %int_1 - OpStore %res %29 + %33 = OpLoad %15 %arg_2 + %34 = OpLoad %11 %arg_1 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_3 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %int %arg_4 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %31 = OpImageGather %v4uint %36 %43 %int_1 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %45 - %47 = OpLabel - %48 = OpFunctionCall %void %textureGather_f2c6e3 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGather_f2c6e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %16 - %50 = OpLabel - %51 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %51 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %16 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGather_f2c6e3 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGather_f2c6e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %16 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGather_f2c6e3 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGather_f2c6e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl index 3a4243c5f4..3005c800cb 100644 --- a/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGather/f2c6e3.wgsl.expected.wgsl @@ -4,7 +4,7 @@ fn textureGather_f2c6e3() { const arg_0 = 1i; - var arg_3 = vec3(); + var arg_3 = vec3(1.0f); var arg_4 = 1i; var res : vec4 = textureGather(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl index f54540c092..e0d3b6ee56 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl @@ -25,10 +25,10 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_144a9a() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl index 889e75c87c..ee5d38aff6 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_144a9a() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl index 889e75c87c..ee5d38aff6 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_144a9a() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl index 000522c742..5920e0e2ed 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } vec4 vertex_main() { @@ -28,10 +28,10 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void fragment_main() { @@ -47,10 +47,10 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_144a9a() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl index 2332e49e89..6e0c82f1b6 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureGatherCompare_144a9a(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm index d2973ef48f..c027f946a7 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 64 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,63 +46,65 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %46 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %48 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %49 = OpTypeFunction %v4float + %51 = OpTypeFunction %v4float %textureGatherCompare_144a9a = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageDrefGather %v4float %35 %42 %43 ConstOffset %46 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageDrefGather %v4float %36 %43 %44 ConstOffset %48 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %49 - %51 = OpLabel - %52 = OpFunctionCall %void %textureGatherCompare_144a9a +%vertex_main_inner = OpFunction %v4float None %51 + %53 = OpLabel + %54 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %55 + %56 = OpLabel + %57 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %57 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGatherCompare_144a9a + %59 = OpLabel + %60 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %60 = OpLabel - %61 = OpFunctionCall %void %textureGatherCompare_144a9a + %62 = OpLabel + %63 = OpFunctionCall %void %textureGatherCompare_144a9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl index 354490979e..bff46b7a50 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/144a9a.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_144a9a() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl index 1c12576ea6..c021e006ad 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> vec4 fn textureGatherCompare_182fd4() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl index 294d4d3441..775595e5a7 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_182fd4() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl index 294d4d3441..775595e5a7 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_182fd4() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl index af1dd4da82..7d7d856f33 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3); } @@ -45,7 +45,7 @@ void main() { uniform highp samplerCubeShadow arg_0_arg_1; void textureGatherCompare_182fd4() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.msl index 5f3be12095..34f3a8c232 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_182fd4(depthcube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.spvasm index e8bd4b7ef1..e2761584bc 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_182fd4 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v3float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageDrefGather %v4float %30 %31 %32 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageDrefGather %v4float %31 %32 %33 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGatherCompare_182fd4 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_182fd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_182fd4 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_182fd4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGatherCompare_182fd4 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_182fd4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl index d2d4c30811..e810f095bd 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/182fd4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_182fd4() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl index d6ea315108..7ca38fb6bc 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: u32, depth_ref: f32) -> vec4 fn textureGatherCompare_2e409c() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl index 625ef63542..fb2cc17c4a 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_2e409c() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl index 625ef63542..fb2cc17c4a 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_2e409c() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl index bd7e1006d5..7f17941b20 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_2e409c(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm index e65e051ac2..c937e06da3 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,60 +47,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureGatherCompare_2e409c = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %36 = OpLoad %v3float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %39 = OpCompositeExtract %float %36 2 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageDrefGather %v4float %35 %42 %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageDrefGather %v4float %36 %43 %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGatherCompare_2e409c +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGatherCompare_2e409c + %55 = OpLabel + %56 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGatherCompare_2e409c + %58 = OpLabel + %59 = OpFunctionCall %void %textureGatherCompare_2e409c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl index 384d9fdab1..1534917730 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/2e409c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_2e409c() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl index 6dee4b9425..58b2f55f35 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl @@ -25,9 +25,9 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_313add() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl index c92a22bdaf..46845ac1d3 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_313add() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl index c92a22bdaf..46845ac1d3 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_313add() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl index 951aa5ab94..fc17439d09 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_313add() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl index 48629383d9..461ee0536d 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureGatherCompare_313add(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.spvasm index fe55f7a924..258471391f 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,51 +45,53 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %textureGatherCompare_313add = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v2float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageDrefGather %v4float %30 %31 %32 ConstOffset %35 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageDrefGather %v4float %31 %32 %33 ConstOffset %37 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureGatherCompare_313add +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureGatherCompare_313add OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGatherCompare_313add + %48 = OpLabel + %49 = OpFunctionCall %void %textureGatherCompare_313add OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureGatherCompare_313add + %51 = OpLabel + %52 = OpFunctionCall %void %textureGatherCompare_313add OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl index bf8dea8f84..9b3cb2ccb1 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/313add.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_313add() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl index bfb5ad1d0d..fc825242d5 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_60d2d1() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl index a0284d85ec..76afffaff8 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_60d2d1() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl index a0284d85ec..76afffaff8 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_60d2d1() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.msl index 682a170df8..ee191490b0 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_60d2d1(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm index 660f0f304f..2320452f2a 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,60 +47,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureGatherCompare_60d2d1 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %36 = OpLoad %v3float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %39 = OpCompositeExtract %float %36 2 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageDrefGather %v4float %35 %42 %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageDrefGather %v4float %36 %43 %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGatherCompare_60d2d1 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGatherCompare_60d2d1 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGatherCompare_60d2d1 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGatherCompare_60d2d1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl index 4ecb26c565..3937d85dd4 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/60d2d1.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_60d2d1() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl index 083163ef21..5802254099 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> vec4 fn textureGatherCompare_6d9352() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl index 6c7d0f4904..d136dca812 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_6d9352() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl index 6c7d0f4904..d136dca812 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_6d9352() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl index b57e6630f6..94b92bb58b 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureGatherCompare_6d9352() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; vec4 res = textureGather(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.msl index ce423455f3..2dc296dd21 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_6d9352(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.spvasm index 0a6a85730d..eaab3eeb8f 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureGatherCompare_6d9352 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v2float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageDrefGather %v4float %30 %31 %32 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageDrefGather %v4float %31 %32 %33 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureGatherCompare_6d9352 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureGatherCompare_6d9352 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureGatherCompare_6d9352 + %44 = OpLabel + %45 = OpFunctionCall %void %textureGatherCompare_6d9352 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureGatherCompare_6d9352 + %47 = OpLabel + %48 = OpFunctionCall %void %textureGatherCompare_6d9352 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl index c20268270c..e7aff07736 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/6d9352.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_6d9352() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl index f3d7bbbfa8..60450e134c 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> vec4 fn textureGatherCompare_783e65() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl index c0b2cced51..827c246f14 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_783e65() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl index c0b2cced51..827c246f14 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_783e65() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl index 84f32d58df..a137b93fde 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -28,7 +28,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -47,7 +47,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_783e65() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.msl index b6aade7f31..5d7179d777 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_783e65(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm index 9b37b338ef..9d93082837 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureGatherCompare_783e65 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageDrefGather %v4float %35 %42 %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageDrefGather %v4float %36 %43 %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGatherCompare_783e65 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGatherCompare_783e65 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGatherCompare_783e65 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGatherCompare_783e65 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl index f6d5b8fe20..cbb0d13005 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/783e65.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_783e65() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl index 0dd8c4d3d1..03eef71c21 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl @@ -25,7 +25,7 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32) -> vec4 fn textureGatherCompare_b5bc43() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl index f6637752b4..a4ffc045d3 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_b5bc43() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl index f6637752b4..a4ffc045d3 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_b5bc43() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl index 5e394d12f9..ecc3638c4f 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -28,7 +28,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -47,7 +47,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_b5bc43() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; vec4 res = textureGather(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl index 24c567b73e..31fc042df9 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureGatherCompare_b5bc43(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm index 770ddcf3a2..e67de9f156 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureGatherCompare_b5bc43 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageDrefGather %v4float %35 %42 %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageDrefGather %v4float %36 %43 %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureGatherCompare_b5bc43 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureGatherCompare_b5bc43 + %55 = OpLabel + %56 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureGatherCompare_b5bc43 + %58 = OpLabel + %59 = OpFunctionCall %void %textureGatherCompare_b5bc43 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl index a17ccf0add..77400308a1 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/b5bc43.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_b5bc43() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl index a9cb427c65..f742acda38 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl @@ -25,10 +25,10 @@ // fn textureGatherCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> vec4 fn textureGatherCompare_f585cc() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl index eef0720cda..f4905b5229 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_f585cc() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl index eef0720cda..f4905b5229 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureGatherCompare_f585cc() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.GatherCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl index 8ae1b0adc1..38f91d2309 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } vec4 vertex_main() { @@ -28,10 +28,10 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void fragment_main() { @@ -47,10 +47,10 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureGatherCompare_f585cc() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureGatherOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl index 31ed159b29..adfe72cb58 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureGatherCompare_f585cc(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(0)); + float4 res = tint_symbol_1.gather_compare(tint_symbol_2, arg_2, arg_3, arg_4, int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm index 9d23a2274a..498b0fe63d 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 61 +; Bound: 62 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,62 +46,63 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %45 = OpConstantNull %v2int + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %48 = OpTypeFunction %v4float + %49 = OpTypeFunction %v4float %textureGatherCompare_f585cc = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageDrefGather %v4float %35 %42 %43 ConstOffset %45 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageDrefGather %v4float %36 %43 %44 ConstOffset %46 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureGatherCompare_f585cc +%vertex_main_inner = OpFunction %v4float None %49 + %51 = OpLabel + %52 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %54 = OpLabel + %55 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %55 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureGatherCompare_f585cc + %57 = OpLabel + %58 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %59 = OpLabel - %60 = OpFunctionCall %void %textureGatherCompare_f585cc + %60 = OpLabel + %61 = OpFunctionCall %void %textureGatherCompare_f585cc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl index e3983d2bba..e495b0f512 100644 --- a/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureGatherCompare/f585cc.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureGatherCompare_f585cc() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureGatherCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl index ad2c4e11ce..d8febef137 100644 --- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_019da0() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl index d7d911328a..f661e8dda7 100644 --- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_019da0() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; float4 res = arg_0.Load(int4(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl index d7d911328a..f661e8dda7 100644 --- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_019da0() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; float4 res = arg_0.Load(int4(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl index f4f76c3b75..62b9a35c7f 100644 --- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_019da0() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl index 9355436d95..78ea10c530 100644 --- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_019da0(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); + int3 arg_1 = int3(1); uint arg_2 = 1u; float4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm index b3dc43b405..3c9fcaec9f 100644 --- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,50 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_019da0 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3int %arg_1 - %29 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4float %27 %28 Lod %29 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4float %29 %30 Lod %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_019da0 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_019da0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_019da0 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_019da0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_019da0 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_019da0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl index 90c76184ba..d4653f6f4f 100644 --- a/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/019da0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_019da0() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl index 8cca36c329..74edd08481 100644 --- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_026217() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl index bd6e939d98..e8a34dd0fb 100644 --- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_026217() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl index bd6e939d98..e8a34dd0fb 100644 --- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_026217() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl index 182e96868a..57801dfb1f 100644 --- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_026217() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl index 4e2fc4d79f..68fe376dea 100644 --- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_026217(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; int arg_3 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm index fd8d9f2c17..9e98066c42 100644 --- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,60 +41,61 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %42 = OpConstantNull %v4uint - %43 = OpTypeFunction %v4float + %43 = OpConstantNull %v4uint + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_026217 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_int Function %29 - %res = OpVariable %_ptr_Function_v4uint Function %42 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %43 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2uint %arg_1 - %35 = OpCompositeExtract %uint %34 0 - %36 = OpCompositeExtract %uint %34 1 - %37 = OpLoad %uint %arg_2 - %38 = OpCompositeConstruct %v3uint %35 %36 %37 - %39 = OpLoad %int %arg_3 - %30 = OpImageFetch %v4uint %32 %38 Lod %39 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %38 = OpLoad %uint %arg_2 + %39 = OpCompositeConstruct %v3uint %36 %37 %38 + %40 = OpLoad %int %arg_3 + %31 = OpImageFetch %v4uint %33 %39 Lod %40 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_026217 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_026217 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_026217 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_026217 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %55 = OpLabel - %56 = OpFunctionCall %void %textureLoad_026217 + %56 = OpLabel + %57 = OpFunctionCall %void %textureLoad_026217 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl index 1e2a15b0fa..b117b2d0d9 100644 --- a/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/026217.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_026217() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl index 6047511e20..dc1160e45e 100644 --- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: u32) -> f32 fn textureLoad_04b911() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl index bce9f3c2a4..fec8d4f7fa 100644 --- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_04b911() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl index bce9f3c2a4..fec8d4f7fa 100644 --- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_04b911() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl index 2742b07ce2..4427e30d51 100644 --- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_04b911() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl index a8900e99e4..12f55f7d8d 100644 --- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_04b911(depth2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; uint arg_3 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm index bcdf21d549..fc8d6f5028 100644 --- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,60 +41,61 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int - %uint_1 = OpConstant %uint 1 + %27 = OpConstantNull %int %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v3uint = OpTypeVector %uint 3 %_ptr_Function_float = OpTypePointer Function %float - %43 = OpTypeFunction %v4float + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_04b911 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2uint %arg_1 - %35 = OpCompositeExtract %uint %34 0 - %36 = OpCompositeExtract %uint %34 1 - %38 = OpLoad %int %arg_2 - %37 = OpBitcast %uint %38 - %39 = OpCompositeConstruct %v3uint %35 %36 %37 - %40 = OpLoad %uint %arg_3 - %31 = OpImageFetch %v4float %32 %39 Lod %40 - %30 = OpCompositeExtract %float %31 0 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %uint %arg_3 + %32 = OpImageFetch %v4float %33 %40 Lod %41 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_04b911 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_04b911 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_04b911 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_04b911 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %55 = OpLabel - %56 = OpFunctionCall %void %textureLoad_04b911 + %56 = OpLabel + %57 = OpFunctionCall %void %textureLoad_04b911 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl index ee485834fe..bdff9487ca 100644 --- a/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/04b911.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_04b911() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl index 2563e1c755..2f1e52adcb 100644 --- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_168dc8() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl index 56cc8e83db..abc8e57e96 100644 --- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_168dc8() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl index 56cc8e83db..abc8e57e96 100644 --- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_168dc8() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl index a0cc687e26..cca08c59c1 100644 --- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_168dc8() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl index 3ade60f57d..b157f12047 100644 --- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_168dc8(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; int arg_3 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm index 4febae6721..fd2efd257d 100644 --- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,57 +42,59 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %40 = OpConstantNull %v4int - %41 = OpTypeFunction %v4float + %42 = OpConstantNull %v4int + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_168dc8 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4int Function %40 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4int Function %42 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %int %arg_3 - %27 = OpImageFetch %v4int %29 %36 Lod %37 - OpStore %res %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %37 = OpLoad %int %arg_2 + %36 = OpBitcast %uint %37 + %38 = OpCompositeConstruct %v3uint %34 %35 %36 + %39 = OpLoad %int %arg_3 + %29 = OpImageFetch %v4int %31 %38 Lod %39 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_168dc8 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_168dc8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_168dc8 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_168dc8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_168dc8 + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_168dc8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl index 6642f02fe5..ccd9e51926 100644 --- a/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/168dc8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_168dc8() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl index 4863704c78..3614c35779 100644 --- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: i32) -> f32 fn textureLoad_19cf87() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl index b9e2e0d97f..6482ac0375 100644 --- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_19cf87() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float res = arg_0.Load(int3(arg_1, arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl index b9e2e0d97f..6482ac0375 100644 --- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_19cf87() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float res = arg_0.Load(int3(arg_1, arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl index 0f4a83377e..d202d317e2 100644 --- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; float res = texelFetch(arg_0_1, arg_1, arg_2).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; float res = texelFetch(arg_0_1, arg_1, arg_2).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_19cf87() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; float res = texelFetch(arg_0_1, arg_1, arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl index 19f28cdcfa..72e24bbc47 100644 --- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_19cf87(depth2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.spvasm index 9f43b724d2..cd116878d6 100644 --- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,49 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_19cf87 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4float %27 %28 Lod %29 - %25 = OpCompositeExtract %float %26 0 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %int %arg_2 + %27 = OpImageFetch %v4float %28 %29 Lod %30 + %26 = OpCompositeExtract %float %27 0 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_19cf87 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_19cf87 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_19cf87 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_19cf87 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_19cf87 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_19cf87 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl index 4eac9722c2..203dfc5003 100644 --- a/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/19cf87.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_19cf87() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl index c493409a16..dff77c1b86 100644 --- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_1b051f() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl index d6388280bb..ce8e545c86 100644 --- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_1b051f() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl index d6388280bb..ce8e545c86 100644 --- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_1b051f() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl index 8e6d181b98..6072777e08 100644 --- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_1b051f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl index ddf4a086cd..c61f6ffec8 100644 --- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1b051f(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm index fd14d430da..9dce9cda79 100644 --- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,57 +42,59 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %40 = OpConstantNull %v4uint - %41 = OpTypeFunction %v4float + %42 = OpConstantNull %v4uint + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_1b051f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %40 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %42 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %uint %arg_3 - %27 = OpImageFetch %v4uint %29 %36 Lod %37 - OpStore %res %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %37 = OpLoad %uint %arg_2 + %36 = OpBitcast %int %37 + %38 = OpCompositeConstruct %v3int %34 %35 %36 + %39 = OpLoad %uint %arg_3 + %29 = OpImageFetch %v4uint %31 %38 Lod %39 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_1b051f +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_1b051f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_1b051f + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_1b051f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_1b051f + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_1b051f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl index 576677d188..c941b74950 100644 --- a/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1b051f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_1b051f() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl index 13db23e3e1..7c1e957e12 100644 --- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_external, coords: vec2) -> vec4 fn textureLoad_1bfdfb() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var res: vec4 = textureLoad(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl index 5e1e301e52..dd7959d29c 100644 --- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.dxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_1bfdfb() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl index 5e1e301e52..dd7959d29c 100644 --- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.fxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_1bfdfb() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl index adc2cf96cc..4011eb4ffd 100644 --- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.glsl @@ -49,7 +49,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner); } @@ -118,7 +118,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner); } @@ -181,7 +181,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, uve uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_1bfdfb() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner); } diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl index f18ad2f9aa..2de6a9dd9b 100644 --- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.msl @@ -58,7 +58,7 @@ float4 textureLoadExternal(texture2d plane0, texture2d tint_symbol_1, texture2d tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, arg_1, *(tint_symbol_3)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm index c1606c9b8d..d9c8b31c70 100644 --- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 141 +; Bound: 142 ; Schema: 0 OpCapability Shader %28 = OpExtInstImport "GLSL.std.450" @@ -115,12 +115,13 @@ %93 = OpConstantNull %uint %void = OpTypeVoid %111 = OpTypeFunction %void - %115 = OpConstantNull %v2uint + %115 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %118 = OpConstantNull %v2uint %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %128 = OpTypeFunction %v4float + %129 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %22 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -214,37 +215,37 @@ OpFunctionEnd %textureLoad_1bfdfb = OpFunction %void None %111 %114 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %115 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %118 %res = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %115 - %119 = OpLoad %11 %arg_0 - %120 = OpLoad %11 %ext_tex_plane_1 - %121 = OpLoad %v2uint %arg_1 - %124 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %125 = OpLoad %ExternalTextureParams %124 - %118 = OpFunctionCall %v4float %textureLoadExternal %119 %120 %121 %125 - OpStore %res %118 + %120 = OpLoad %11 %arg_0 + %121 = OpLoad %11 %ext_tex_plane_1 + %122 = OpLoad %v2uint %arg_1 + %125 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %126 = OpLoad %ExternalTextureParams %125 + %119 = OpFunctionCall %v4float %textureLoadExternal %120 %121 %122 %126 + OpStore %res %119 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %128 - %130 = OpLabel - %131 = OpFunctionCall %void %textureLoad_1bfdfb +%vertex_main_inner = OpFunction %v4float None %129 + %131 = OpLabel + %132 = OpFunctionCall %void %textureLoad_1bfdfb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %111 - %133 = OpLabel - %134 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %134 + %134 = OpLabel + %135 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %135 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %111 - %136 = OpLabel - %137 = OpFunctionCall %void %textureLoad_1bfdfb + %137 = OpLabel + %138 = OpFunctionCall %void %textureLoad_1bfdfb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %111 - %139 = OpLabel - %140 = OpFunctionCall %void %textureLoad_1bfdfb + %140 = OpLabel + %141 = OpFunctionCall %void %textureLoad_1bfdfb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl index 52a6fc3696..9e3fd90cce 100644 --- a/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1bfdfb.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_external; fn textureLoad_1bfdfb() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var res : vec4 = textureLoad(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl index edd5e4d451..550618fa8b 100644 --- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_1c562a() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl index 0bb5f3468b..332dd71ce7 100644 --- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1c562a() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; uint4 res = arg_0.Load(uint4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl index 0bb5f3468b..332dd71ce7 100644 --- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1c562a() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; uint4 res = arg_0.Load(uint4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl index 846f8f5c9d..c028bc9804 100644 --- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_1c562a() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl index a8cffe5963..f00e16215d 100644 --- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1c562a(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); + uint3 arg_1 = uint3(1u); uint arg_2 = 1u; uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm index ee1302d7f5..afcdd7feb4 100644 --- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,50 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint -%_ptr_Function_v3uint = OpTypePointer Function %v3uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 +%_ptr_Function_v3uint = OpTypePointer Function %v3uint + %22 = OpConstantNull %v3uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_1c562a = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %res = OpVariable %_ptr_Function_v4uint Function %32 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %33 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3uint %arg_1 - %29 = OpLoad %uint %arg_2 - %25 = OpImageFetch %v4uint %27 %28 Lod %29 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3uint %arg_1 + %30 = OpLoad %uint %arg_2 + %26 = OpImageFetch %v4uint %28 %29 Lod %30 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_1c562a +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_1c562a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_1c562a + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_1c562a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_1c562a + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_1c562a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl index 6f9672a3ec..376ef1824a 100644 --- a/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1c562a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_1c562a() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl index f075b9d813..8bdaca3c05 100644 --- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_1f2016() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl index 391759d7ab..7bd7b08cae 100644 --- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1f2016() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; int arg_2 = 1; float4 res = arg_0.Load(int4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl index 391759d7ab..7bd7b08cae 100644 --- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_1f2016() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; int arg_2 = 1; float4 res = arg_0.Load(int4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl index 57b8362e83..d9d2ec281a 100644 --- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_1f2016() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl index 3448c42055..77871f52c9 100644 --- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_1f2016(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); + int3 arg_1 = int3(1); int arg_2 = 1; float4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.spvasm index cc9edd38c1..e23cbd2014 100644 --- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,47 +40,48 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int -%_ptr_Function_v3int = OpTypePointer Function %v3int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 +%_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_1f2016 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v3int %arg_1 - %28 = OpLoad %int %arg_2 - %25 = OpImageFetch %v4float %26 %27 Lod %28 - OpStore %res %25 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %v3int %arg_1 + %29 = OpLoad %int %arg_2 + %26 = OpImageFetch %v4float %27 %28 Lod %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureLoad_1f2016 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_1f2016 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_1f2016 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_1f2016 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_1f2016 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_1f2016 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl index 6b1d5beb96..75c7236cce 100644 --- a/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/1f2016.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_1f2016() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl index 39593e81c3..3ef6188424 100644 --- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_21d1c4() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl index 28c9d440b9..e640c9375f 100644 --- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_21d1c4() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; float4 res = arg_0.Load(uint4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl index 28c9d440b9..e640c9375f 100644 --- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_21d1c4() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; float4 res = arg_0.Load(uint4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl index addbf630e5..68354e2728 100644 --- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_21d1c4() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl index c3441bf55e..c9d04734da 100644 --- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_21d1c4(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); + uint3 arg_1 = uint3(1u); uint arg_2 = 1u; float4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm index 6d1818465d..1f7c3240dc 100644 --- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,47 +40,48 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint -%_ptr_Function_v3uint = OpTypePointer Function %v3uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 +%_ptr_Function_v3uint = OpTypePointer Function %v3uint + %22 = OpConstantNull %v3uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_21d1c4 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v3uint %arg_1 - %28 = OpLoad %uint %arg_2 - %25 = OpImageFetch %v4float %26 %27 Lod %28 - OpStore %res %25 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %v3uint %arg_1 + %29 = OpLoad %uint %arg_2 + %26 = OpImageFetch %v4float %27 %28 Lod %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureLoad_21d1c4 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_21d1c4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_21d1c4 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_21d1c4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_21d1c4 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_21d1c4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl index f363fdeb3a..5bcf24687f 100644 --- a/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/21d1c4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_21d1c4() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl index 732e25a89e..2cb9d2806d 100644 --- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_223246() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl index 1589eae8b2..91694caa80 100644 --- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_223246() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; int arg_2 = 1; int4 res = arg_0.Load(uint4(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl index 1589eae8b2..91694caa80 100644 --- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_223246() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; int arg_2 = 1; int4 res = arg_0.Load(uint4(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl index 127baddd50..364d598363 100644 --- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_223246() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_223246() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_223246() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl index 324ebe690e..cd5474507d 100644 --- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_223246(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); + uint3 arg_1 = uint3(1u); int arg_2 = 1; int4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm index a5ebb89f11..2d7fb3268f 100644 --- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,51 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %23 = OpConstantNull %v3uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_223246 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4int Function %35 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v3uint %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4int %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v3uint %arg_1 + %32 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4int %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_223246 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_223246 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_223246 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_223246 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_223246 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_223246 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl index 119a40bbc6..646ea843ba 100644 --- a/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/223246.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_223246() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl index 99b25dfe2d..70494bc718 100644 --- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_2363be() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl index b3099c3954..2f03a64d92 100644 --- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_2363be() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl index b3099c3954..2f03a64d92 100644 --- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_2363be() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; int4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl index 56f91305b5..125172350c 100644 --- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_2363be() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl index 74c4e166da..2a955c596f 100644 --- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2363be(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; uint arg_3 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm index 7995b70879..ee273d82d6 100644 --- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,60 +42,61 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int - %uint_1 = OpConstant %uint 1 + %27 = OpConstantNull %int %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %43 = OpConstantNull %v4int - %44 = OpTypeFunction %v4float + %44 = OpConstantNull %v4int + %45 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_2363be = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 - %res = OpVariable %_ptr_Function_v4int Function %43 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %44 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2uint %arg_1 - %35 = OpCompositeExtract %uint %34 0 - %36 = OpCompositeExtract %uint %34 1 - %38 = OpLoad %int %arg_2 - %37 = OpBitcast %uint %38 - %39 = OpCompositeConstruct %v3uint %35 %36 %37 - %40 = OpLoad %uint %arg_3 - %30 = OpImageFetch %v4int %32 %39 Lod %40 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %uint %arg_3 + %31 = OpImageFetch %v4int %33 %40 Lod %41 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_2363be +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_2363be OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_2363be + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_2363be OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %56 = OpLabel - %57 = OpFunctionCall %void %textureLoad_2363be + %57 = OpLabel + %58 = OpFunctionCall %void %textureLoad_2363be OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl index 35157c0212..3a453a7621 100644 --- a/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/2363be.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_2363be() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl index 69b005c081..2365adee19 100644 --- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_2d479c() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl index 364f342e95..b92c9e2c04 100644 --- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_2d479c() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float4 res = arg_0.Load(int3(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl index 364f342e95..b92c9e2c04 100644 --- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_2d479c() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float4 res = arg_0.Load(int3(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl index 87a8fd9e26..c8adc02c23 100644 --- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_2d479c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl index fa0fc90e7e..c55a8c2fdc 100644 --- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2d479c(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm index 59d6c52750..998c827ffa 100644 --- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,50 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_2d479c = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4float %27 %28 Lod %29 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4float %29 %30 Lod %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_2d479c +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_2d479c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_2d479c + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_2d479c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_2d479c + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_2d479c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl index 1740e119ea..d29f519e21 100644 --- a/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/2d479c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_2d479c() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl index 9a79fe2f53..27f61c6ac1 100644 --- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_2e09aa() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl index 0219fc6d77..fa848d34a3 100644 --- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_2e09aa() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl index 0219fc6d77..fa848d34a3 100644 --- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_2e09aa() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl index e6b2a00ce5..237f3117d8 100644 --- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_2e09aa() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl index f1ec21475d..b7cc5d0bda 100644 --- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_2e09aa(texture2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm index 751b31ee2a..58dcfbb339 100644 --- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,47 +40,48 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_2e09aa = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2uint %arg_1 - %28 = OpLoad %uint %arg_2 - %25 = OpImageFetch %v4float %26 %27 Sample %28 - OpStore %res %25 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %v2uint %arg_1 + %29 = OpLoad %uint %arg_2 + %26 = OpImageFetch %v4float %27 %28 Sample %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureLoad_2e09aa +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_2e09aa OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_2e09aa + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_2e09aa OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_2e09aa + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_2e09aa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl index 22a0a7036e..2a0781b7bf 100644 --- a/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/2e09aa.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_2e09aa() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl index dc74980fac..526039a5e2 100644 --- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_38f8ab() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl index 775c51acf7..ee90bc432e 100644 --- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_38f8ab() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl index 775c51acf7..ee90bc432e 100644 --- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_38f8ab() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl index be03c722be..4499324e58 100644 --- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_38f8ab() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl index fb04229a91..6749f45f47 100644 --- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_38f8ab(texture2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm index 426ee5bd70..7c8c28a022 100644 --- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,50 +40,52 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_38f8ab = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4int Function %35 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4int %28 %29 Sample %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4int %30 %31 Sample %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_38f8ab +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_38f8ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_38f8ab + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_38f8ab OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_38f8ab + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_38f8ab OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl index c09340e00d..33fdb48749 100644 --- a/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/38f8ab.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_38f8ab() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl index 9a60cf51bc..212e8f03f1 100644 --- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_3c96e8() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl index 4a6573b66a..5fbc79d37a 100644 --- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3c96e8() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl index 4a6573b66a..5fbc79d37a 100644 --- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3c96e8() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl index 4c840cee89..764dd9894a 100644 --- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_3c96e8() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl index f9c58d0d89..61f0a953a7 100644 --- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_3c96e8(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; uint arg_3 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm index fe674a3fcd..5729843001 100644 --- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,58 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v3int = OpTypeVector %int 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %39 = OpTypeFunction %v4float + %41 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_3c96e8 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %34 = OpLoad %uint %arg_2 - %33 = OpBitcast %int %34 - %35 = OpCompositeConstruct %v3int %31 %32 %33 - %36 = OpLoad %uint %arg_3 - %27 = OpImageFetch %v4float %28 %35 Lod %36 - OpStore %res %27 + %30 = OpLoad %11 %arg_0 + %32 = OpLoad %v2int %arg_1 + %33 = OpCompositeExtract %int %32 0 + %34 = OpCompositeExtract %int %32 1 + %36 = OpLoad %uint %arg_2 + %35 = OpBitcast %int %36 + %37 = OpCompositeConstruct %v3int %33 %34 %35 + %38 = OpLoad %uint %arg_3 + %29 = OpImageFetch %v4float %30 %37 Lod %38 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_3c96e8 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_3c96e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureLoad_3c96e8 + %50 = OpLabel + %51 = OpFunctionCall %void %textureLoad_3c96e8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_3c96e8 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_3c96e8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl index 7ef60df0a4..989fcd1330 100644 --- a/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/3c96e8.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_3c96e8() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl index 6db9486241..a334be36fa 100644 --- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_3d3fd1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl index e2bc1442f7..0bcbf5d112 100644 --- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3d3fd1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl index e2bc1442f7..0bcbf5d112 100644 --- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_3d3fd1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl index 7b27d901ec..d6c96684f4 100644 --- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_3d3fd1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl index 96fb2e531f..a8b111d959 100644 --- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_3d3fd1(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; int arg_3 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm index 75c9dbbbe2..bead114e80 100644 --- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,59 +42,60 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v4int = OpTypeVector %int 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %42 = OpConstantNull %v4int - %43 = OpTypeFunction %v4float + %43 = OpConstantNull %v4int + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_3d3fd1 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %29 - %res = OpVariable %_ptr_Function_v4int Function %42 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %arg_3 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4int Function %43 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2uint %arg_1 - %35 = OpCompositeExtract %uint %34 0 - %36 = OpCompositeExtract %uint %34 1 - %37 = OpLoad %uint %arg_2 - %38 = OpCompositeConstruct %v3uint %35 %36 %37 - %39 = OpLoad %int %arg_3 - %30 = OpImageFetch %v4int %32 %38 Lod %39 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %38 = OpLoad %uint %arg_2 + %39 = OpCompositeConstruct %v3uint %36 %37 %38 + %40 = OpLoad %int %arg_3 + %31 = OpImageFetch %v4int %33 %39 Lod %40 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_3d3fd1 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_3d3fd1 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %55 = OpLabel - %56 = OpFunctionCall %void %textureLoad_3d3fd1 + %56 = OpLabel + %57 = OpFunctionCall %void %textureLoad_3d3fd1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl index 600e3fd7fc..cb5a986566 100644 --- a/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/3d3fd1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_3d3fd1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl index e14788e540..b143637c65 100644 --- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_439e2a() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl index a1ae75e06d..4a20f157eb 100644 --- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_439e2a() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float4 res = arg_0.Load(uint3(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl index a1ae75e06d..4a20f157eb 100644 --- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_439e2a() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float4 res = arg_0.Load(uint3(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl index a22fd5ae33..43a6e7912c 100644 --- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_439e2a() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl index 5a3246d27f..cb28c38acc 100644 --- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_439e2a(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm index f7cc6a4cfb..0244e8f3f3 100644 --- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,50 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_439e2a = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4float %27 %28 Lod %29 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4float %29 %30 Lod %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_439e2a +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_439e2a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_439e2a + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_439e2a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_439e2a + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_439e2a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl index a46785f881..49c8ef65e5 100644 --- a/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/439e2a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_439e2a() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl index 466e57b203..ecd9e2dd26 100644 --- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_46a93f() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl index 765ad54239..a304c23f6b 100644 --- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_46a93f() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl index 765ad54239..a304c23f6b 100644 --- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_46a93f() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl index c048820219..6679489230 100644 --- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_46a93f() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl index 2116606928..71ac80db4e 100644 --- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_46a93f(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; uint arg_3 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm index 009e43c5c5..c227fb8425 100644 --- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,59 +41,60 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int - %uint_1 = OpConstant %uint 1 + %27 = OpConstantNull %int %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %42 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_46a93f = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %uint %arg_3 - %30 = OpImageFetch %v4float %31 %38 Lod %39 - OpStore %res %30 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2uint %arg_1 + %35 = OpCompositeExtract %uint %34 0 + %36 = OpCompositeExtract %uint %34 1 + %38 = OpLoad %int %arg_2 + %37 = OpBitcast %uint %38 + %39 = OpCompositeConstruct %v3uint %35 %36 %37 + %40 = OpLoad %uint %arg_3 + %31 = OpImageFetch %v4float %32 %39 Lod %40 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_46a93f +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_46a93f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_46a93f + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_46a93f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %54 = OpLabel - %55 = OpFunctionCall %void %textureLoad_46a93f + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_46a93f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl index 54c6d9eb38..53978957ac 100644 --- a/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/46a93f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_46a93f() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl index 98c983245b..031a74400f 100644 --- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_47e818() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl index 71c7aac8c4..47f141ff17 100644 --- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_47e818() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; int4 res = arg_0.Load(uint4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl index 71c7aac8c4..47f141ff17 100644 --- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_47e818() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; uint arg_2 = 1u; int4 res = arg_0.Load(uint4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl index a734ffbe58..fc245594ad 100644 --- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_47e818() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl index 7f3d122b59..56a4c7f54e 100644 --- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_47e818(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); + uint3 arg_1 = uint3(1u); uint arg_2 = 1u; int4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm index b4a1420960..4e54df7264 100644 --- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,50 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint -%_ptr_Function_v3uint = OpTypePointer Function %v3uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 +%_ptr_Function_v3uint = OpTypePointer Function %v3uint + %23 = OpConstantNull %v3uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v4int + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_47e818 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %res = OpVariable %_ptr_Function_v4int Function %34 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v3uint %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4int %28 %29 Lod %30 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3uint %arg_1 + %31 = OpLoad %uint %arg_2 + %27 = OpImageFetch %v4int %29 %30 Lod %31 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_47e818 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_47e818 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_47e818 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_47e818 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_47e818 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_47e818 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl index 1086f0443e..a12e28a833 100644 --- a/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/47e818.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_47e818() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl index 2c2009fa11..552b7dfcb8 100644 --- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_484344() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl index 0a3f44705d..f3fe7c7547 100644 --- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_484344() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float4 res = arg_0.Load(int3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl index 0a3f44705d..f3fe7c7547 100644 --- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_484344() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float4 res = arg_0.Load(int3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl index d9fbf9202e..81960e394a 100644 --- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_484344() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_484344() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_484344() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl index f940852f17..6697cc8fe2 100644 --- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_484344(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.spvasm index a94e4a0858..19acab1933 100644 --- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,47 +40,48 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_484344 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2int %arg_1 - %28 = OpLoad %int %arg_2 - %25 = OpImageFetch %v4float %26 %27 Lod %28 - OpStore %res %25 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %v2int %arg_1 + %29 = OpLoad %int %arg_2 + %26 = OpImageFetch %v4float %27 %28 Lod %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureLoad_484344 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_484344 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_484344 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_484344 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_484344 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_484344 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl index a11fc7e74f..7cf5e98b2c 100644 --- a/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/484344.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_484344() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl index 034fef4c01..feebbc17da 100644 --- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_49f76f() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl index 16d7d8d611..675a966324 100644 --- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_49f76f() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl index 16d7d8d611..675a966324 100644 --- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_49f76f() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl index 7e0cd86c0b..2da3218af4 100644 --- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_49f76f() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl index af663e0c0d..d02c066626 100644 --- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_49f76f(texture2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm index 51c8570e5a..fce5a33e4d 100644 --- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,50 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_49f76f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %res = OpVariable %_ptr_Function_v4uint Function %32 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %33 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %uint %arg_2 - %25 = OpImageFetch %v4uint %27 %28 Sample %29 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %uint %arg_2 + %26 = OpImageFetch %v4uint %28 %29 Sample %30 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_49f76f +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_49f76f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_49f76f + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_49f76f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_49f76f + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_49f76f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl index 9a6fcc74e3..44b947ff0a 100644 --- a/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/49f76f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_49f76f() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl index 845846acee..19e2c4c57b 100644 --- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_4acb64() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl index 20e8d8a495..fa29f2f64e 100644 --- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_4acb64() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl index 20e8d8a495..fa29f2f64e 100644 --- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_4acb64() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; float4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl index beae394aa4..01aa8a10a5 100644 --- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_4acb64() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl index 51b9fe8fe5..35052ecf8a 100644 --- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4acb64(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; int arg_3 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm index b9042ccfa5..0c418eb965 100644 --- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,59 +41,60 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint - %int_1 = OpConstant %int 1 + %27 = OpConstantNull %uint %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v3int = OpTypeVector %int 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %42 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_4acb64 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %30 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %int %arg_3 - %30 = OpImageFetch %v4float %31 %38 Lod %39 - OpStore %res %30 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2int %arg_1 + %35 = OpCompositeExtract %int %34 0 + %36 = OpCompositeExtract %int %34 1 + %38 = OpLoad %uint %arg_2 + %37 = OpBitcast %int %38 + %39 = OpCompositeConstruct %v3int %35 %36 %37 + %40 = OpLoad %int %arg_3 + %31 = OpImageFetch %v4float %32 %39 Lod %40 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_4acb64 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_4acb64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_4acb64 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_4acb64 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %54 = OpLabel - %55 = OpFunctionCall %void %textureLoad_4acb64 + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_4acb64 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl index 95aa10843e..a959800816 100644 --- a/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/4acb64.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_4acb64() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl index 2c2af1364c..fe98496555 100644 --- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: u32) -> f32 fn textureLoad_4db25c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl index d6596af4e2..b38c843f50 100644 --- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_4db25c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl index d6596af4e2..b38c843f50 100644 --- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_4db25c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl index 9c82b7ff88..831ec04c5f 100644 --- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_4db25c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl index f6283caae0..5bb17948d1 100644 --- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4db25c(depth2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm index 5e540a9637..9894a9271a 100644 --- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,49 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_4db25c = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4float %27 %28 Sample %29 - %25 = OpCompositeExtract %float %26 0 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %uint %arg_2 + %27 = OpImageFetch %v4float %28 %29 Sample %30 + %26 = OpCompositeExtract %float %27 0 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_4db25c +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_4db25c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_4db25c + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_4db25c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_4db25c + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_4db25c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl index fd9b07f4fb..5148d2c7b8 100644 --- a/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/4db25c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_4db25c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl index a028aab384..d07e87816b 100644 --- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_4fd803() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl index 6e4137898a..4388cd3db6 100644 --- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_4fd803() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; int arg_2 = 1; int4 res = arg_0.Load(int4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl index 6e4137898a..4388cd3db6 100644 --- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_4fd803() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; int arg_2 = 1; int4 res = arg_0.Load(int4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl index 4a3b6e79c9..363fa4836f 100644 --- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_4fd803() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl index 3ec7fc198c..c659fd7fb0 100644 --- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_4fd803(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); + int3 arg_1 = int3(1); int arg_2 = 1; int4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.spvasm index 1a59a534f9..53ff43f148 100644 --- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,50 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int -%_ptr_Function_v3int = OpTypePointer Function %v3int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 +%_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_4fd803 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %res = OpVariable %_ptr_Function_v4int Function %32 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %res = OpVariable %_ptr_Function_v4int Function %33 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3int %arg_1 - %29 = OpLoad %int %arg_2 - %25 = OpImageFetch %v4int %27 %28 Lod %29 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3int %arg_1 + %30 = OpLoad %int %arg_2 + %26 = OpImageFetch %v4int %28 %29 Lod %30 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_4fd803 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_4fd803 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_4fd803 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_4fd803 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_4fd803 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_4fd803 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl index 26a33f0ba1..028a4e9998 100644 --- a/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/4fd803.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_4fd803() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl index bdf813aea2..988e28f226 100644 --- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_53e142() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl index a93753d5cd..684cb9819e 100644 --- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_53e142() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl index a93753d5cd..684cb9819e 100644 --- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_53e142() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl index c0bcb18a51..76d9c9167c 100644 --- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_53e142() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl index 5bf13f9122..a026705137 100644 --- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_53e142(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; int arg_3 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm index 5d5ccfa0ad..bea8836f31 100644 --- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,58 +41,60 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %40 = OpConstantNull %v4uint - %41 = OpTypeFunction %v4float + %42 = OpConstantNull %v4uint + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_53e142 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %40 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %42 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %int %arg_3 - %27 = OpImageFetch %v4uint %29 %36 Lod %37 - OpStore %res %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %37 = OpLoad %int %arg_2 + %36 = OpBitcast %uint %37 + %38 = OpCompositeConstruct %v3uint %34 %35 %36 + %39 = OpLoad %int %arg_3 + %29 = OpImageFetch %v4uint %31 %38 Lod %39 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_53e142 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_53e142 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_53e142 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_53e142 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_53e142 + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_53e142 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl index e6a62b7ba1..fd73d389bd 100644 --- a/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/53e142.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_53e142() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl index 36e38cf492..abb95bd982 100644 --- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_54a59b() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl index 95f5246d8c..6ab0fca61f 100644 --- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_54a59b() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl index 95f5246d8c..6ab0fca61f 100644 --- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_54a59b() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; float4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl index 30ec30f0c1..2d2fad5a68 100644 --- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_54a59b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl index 54409a05c3..1319af900b 100644 --- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_54a59b(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; int arg_3 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm index 326d53cb3b..6596d31a0b 100644 --- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,58 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %39 = OpTypeFunction %v4float + %41 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_54a59b = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %34 = OpLoad %int %arg_2 - %33 = OpBitcast %uint %34 - %35 = OpCompositeConstruct %v3uint %31 %32 %33 - %36 = OpLoad %int %arg_3 - %27 = OpImageFetch %v4float %28 %35 Lod %36 - OpStore %res %27 + %30 = OpLoad %11 %arg_0 + %32 = OpLoad %v2uint %arg_1 + %33 = OpCompositeExtract %uint %32 0 + %34 = OpCompositeExtract %uint %32 1 + %36 = OpLoad %int %arg_2 + %35 = OpBitcast %uint %36 + %37 = OpCompositeConstruct %v3uint %33 %34 %35 + %38 = OpLoad %int %arg_3 + %29 = OpImageFetch %v4float %30 %37 Lod %38 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_54a59b +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_54a59b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureLoad_54a59b + %50 = OpLabel + %51 = OpFunctionCall %void %textureLoad_54a59b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_54a59b + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_54a59b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl index 08cd7ac9e9..ae4ba00795 100644 --- a/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/54a59b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_54a59b() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl index 7f0036749f..c3d80b7ab9 100644 --- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_6154d4() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl index fa30663f50..b6fbbac5fc 100644 --- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_6154d4() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint4 res = arg_0.Load(int3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl index fa30663f50..b6fbbac5fc 100644 --- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_6154d4() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint4 res = arg_0.Load(int3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl index fbf9ef4916..bab8886da0 100644 --- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_6154d4() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl index dbd0040367..c3721ca630 100644 --- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6154d4(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.spvasm index a03ba99097..7f240910c4 100644 --- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,50 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v4uint + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6154d4 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %34 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Lod %30 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %int %arg_2 + %27 = OpImageFetch %v4uint %29 %30 Lod %31 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_6154d4 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_6154d4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_6154d4 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_6154d4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_6154d4 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_6154d4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl index 9be4066c9c..e970a810f3 100644 --- a/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6154d4.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_6154d4() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl index ed10b36c3f..6f3c159fb0 100644 --- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: i32) -> f32 fn textureLoad_6273b1() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl index b05e1bbdd4..f7ddcb2aca 100644 --- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6273b1() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float res = arg_0.Load(int3(arg_1, 0), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl index b05e1bbdd4..f7ddcb2aca 100644 --- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6273b1() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float res = arg_0.Load(int3(arg_1, 0), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl index ae0115fb00..7a7419c50d 100644 --- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; float res = texelFetch(arg_0_1, arg_1, arg_2).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; float res = texelFetch(arg_0_1, arg_1, arg_2).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_6273b1() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; float res = texelFetch(arg_0_1, arg_1, arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl index 05fb393457..d6b255ced8 100644 --- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6273b1(depth2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.spvasm index 4ed02fb712..a08e42aa34 100644 --- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,49 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6273b1 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4float %27 %28 Sample %29 - %25 = OpCompositeExtract %float %26 0 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %int %arg_2 + %27 = OpImageFetch %v4float %28 %29 Sample %30 + %26 = OpCompositeExtract %float %27 0 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_6273b1 +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_6273b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_6273b1 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_6273b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_6273b1 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_6273b1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl index 7ef8de4a30..7cada9ad87 100644 --- a/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6273b1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_6273b1() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl index 2336058cfa..3d14ad584e 100644 --- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_639962() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl index b349fe4f50..ed58f3ffff 100644 --- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_639962() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl index b349fe4f50..ed58f3ffff 100644 --- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_639962() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl index b273a8c2f4..f5f8da9f7b 100644 --- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_639962() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl index bd713c5b78..c3adfe69f5 100644 --- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_639962(texture2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm index 307a6eb3f7..7057d88d4b 100644 --- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,50 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v4int + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_639962 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %res = OpVariable %_ptr_Function_v4int Function %34 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4int %28 %29 Sample %30 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %uint %arg_2 + %27 = OpImageFetch %v4int %29 %30 Sample %31 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_639962 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_639962 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_639962 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_639962 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_639962 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_639962 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl index 25ea34f64d..c02be59276 100644 --- a/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/639962.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_639962() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl index 49a1afb21b..88e3094466 100644 --- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_656d76() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl index 81de6fa266..be4659092e 100644 --- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_656d76() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl index 81de6fa266..be4659092e 100644 --- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_656d76() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl index 2eb385b8f2..c22ae854d4 100644 --- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_656d76() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl index 11b7b65005..5565e44b21 100644 --- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_656d76(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; uint arg_3 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm index 2fd38ea7b9..112215f1d4 100644 --- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,59 +42,60 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %42 = OpConstantNull %v4uint - %43 = OpTypeFunction %v4float + %43 = OpConstantNull %v4uint + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_656d76 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 - %res = OpVariable %_ptr_Function_v4uint Function %42 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %43 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2int %arg_1 - %35 = OpCompositeExtract %int %34 0 - %36 = OpCompositeExtract %int %34 1 - %37 = OpLoad %int %arg_2 - %38 = OpCompositeConstruct %v3int %35 %36 %37 - %39 = OpLoad %uint %arg_3 - %30 = OpImageFetch %v4uint %32 %38 Lod %39 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %38 = OpLoad %int %arg_2 + %39 = OpCompositeConstruct %v3int %36 %37 %38 + %40 = OpLoad %uint %arg_3 + %31 = OpImageFetch %v4uint %33 %39 Lod %40 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_656d76 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_656d76 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_656d76 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_656d76 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %55 = OpLabel - %56 = OpFunctionCall %void %textureLoad_656d76 + %56 = OpLabel + %57 = OpFunctionCall %void %textureLoad_656d76 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl index 3957ee6a1f..945277394d 100644 --- a/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/656d76.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_656d76() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl index cf9675bdd5..cddd126bc1 100644 --- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: u32) -> f32 fn textureLoad_66be47() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl index e21edcd02f..663ca3a84e 100644 --- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_66be47() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl index e21edcd02f..663ca3a84e 100644 --- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_66be47() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl index 4aa7bd4ca8..191f682ccb 100644 --- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_66be47() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl index e64f0f02c4..8fefeea66d 100644 --- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_66be47(depth2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; uint arg_3 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm index b97083d80f..5a3d22473a 100644 --- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,57 +41,59 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v3int = OpTypeVector %int 3 %_ptr_Function_float = OpTypePointer Function %float - %40 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_66be47 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %27 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %uint %arg_3 - %28 = OpImageFetch %v4float %29 %36 Lod %37 - %27 = OpCompositeExtract %float %28 0 - OpStore %res %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %37 = OpLoad %uint %arg_2 + %36 = OpBitcast %int %37 + %38 = OpCompositeConstruct %v3int %34 %35 %36 + %39 = OpLoad %uint %arg_3 + %30 = OpImageFetch %v4float %31 %38 Lod %39 + %29 = OpCompositeExtract %float %30 0 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_66be47 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_66be47 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %49 = OpLabel - %50 = OpFunctionCall %void %textureLoad_66be47 + %51 = OpLabel + %52 = OpFunctionCall %void %textureLoad_66be47 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_66be47 + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_66be47 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl index 24d10113c1..01a2ec95ba 100644 --- a/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/66be47.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_66be47() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl index 975fbb848e..51a4254552 100644 --- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: u32) -> f32 fn textureLoad_6925bc() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl index 4ce3b6eb7a..86b8281d29 100644 --- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6925bc() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float res = arg_0.Load(int3(arg_1, 0), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl index 4ce3b6eb7a..86b8281d29 100644 --- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_6925bc() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float res = arg_0.Load(int3(arg_1, 0), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl index 6a5b9c2624..baf9efffac 100644 --- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_6925bc() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl index 5512c4201b..739dc4a679 100644 --- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6925bc(depth2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.spvasm index ce6b52edba..dcf7546e74 100644 --- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,51 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6925bc = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %uint %arg_2 - %27 = OpImageFetch %v4float %28 %29 Sample %30 - %26 = OpCompositeExtract %float %27 0 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpLoad %uint %arg_2 + %29 = OpImageFetch %v4float %30 %31 Sample %32 + %28 = OpCompositeExtract %float %29 0 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_6925bc +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_6925bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_6925bc + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_6925bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_6925bc + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_6925bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl index f673c8f707..d399100e60 100644 --- a/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6925bc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_6925bc() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl index 899de73119..892cd1716d 100644 --- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_6bf4b7() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl index a18bddfacb..e35052fba0 100644 --- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_6bf4b7() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; uint4 res = arg_0.Load(int4(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl index a18bddfacb..e35052fba0 100644 --- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_6bf4b7() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; uint4 res = arg_0.Load(int4(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl index 710efc81c3..240d3b6c76 100644 --- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_6bf4b7() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl index 4696cefe02..e46344f828 100644 --- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_6bf4b7(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); + int3 arg_1 = int3(1); uint arg_2 = 1u; uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm index 78fe0c9ff4..f390c9e5d4 100644 --- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,51 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %23 = OpConstantNull %v3int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_6bf4b7 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %35 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v3int %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v3int %arg_1 + %32 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4uint %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_6bf4b7 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_6bf4b7 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_6bf4b7 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_6bf4b7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl index e9564fa64f..697bc953f9 100644 --- a/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/6bf4b7.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_6bf4b7() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl index bd1f65ca05..18510fde22 100644 --- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_714471() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl index 0c18883a78..17f1e85d6c 100644 --- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_714471() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int4 res = arg_0.Load(uint3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl index 0c18883a78..17f1e85d6c 100644 --- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_714471() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int4 res = arg_0.Load(uint3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl index 2c17c62c68..ecf3485621 100644 --- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_714471() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_714471() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_714471() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl index d1479345c3..73e4327fb8 100644 --- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_714471(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm index 791435e655..f42c3b40a9 100644 --- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,50 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v4int + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_714471 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %res = OpVariable %_ptr_Function_v4int Function %34 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4int %28 %29 Lod %30 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %uint %arg_2 + %27 = OpImageFetch %v4int %29 %30 Lod %31 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_714471 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_714471 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_714471 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_714471 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_714471 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_714471 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl index 6692a20c08..327caa379c 100644 --- a/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/714471.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_714471() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl index fafee55e00..d0bdcc2745 100644 --- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_789045() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl index ba39885beb..eac78bd403 100644 --- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_789045() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; float4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl index ba39885beb..eac78bd403 100644 --- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_789045() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; float4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl index 93e95e9f58..baf4b50520 100644 --- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_789045() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl index 267981bd02..0d93156699 100644 --- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_789045(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; uint arg_3 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm index 6e4a50370a..aca45c05a9 100644 --- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,58 +41,59 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v3int = OpTypeVector %int 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %41 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_789045 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %36 = OpLoad %int %arg_2 - %37 = OpCompositeConstruct %v3int %34 %35 %36 - %38 = OpLoad %uint %arg_3 - %30 = OpImageFetch %v4float %31 %37 Lod %38 - OpStore %res %30 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2int %arg_1 + %35 = OpCompositeExtract %int %34 0 + %36 = OpCompositeExtract %int %34 1 + %37 = OpLoad %int %arg_2 + %38 = OpCompositeConstruct %v3int %35 %36 %37 + %39 = OpLoad %uint %arg_3 + %31 = OpImageFetch %v4float %32 %38 Lod %39 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_789045 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_789045 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_789045 + %51 = OpLabel + %52 = OpFunctionCall %void %textureLoad_789045 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_789045 + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_789045 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl index b1a15dddea..865b4283f7 100644 --- a/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/789045.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_789045() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl index ca542b24a8..37a5c29694 100644 --- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_79e697() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl index 25d7208bb5..5532fe6766 100644 --- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_79e697() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; int4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl index 25d7208bb5..5532fe6766 100644 --- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_79e697() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; int4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl index 5e89dce570..2392cd714d 100644 --- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_79e697() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl index 402b25d2f8..dd36d93b70 100644 --- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_79e697(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; int arg_3 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm index 450bbd2f62..9d9cb9e499 100644 --- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,57 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %38 = OpConstantNull %v4int - %39 = OpTypeFunction %v4float + %39 = OpConstantNull %v4int + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_79e697 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_int Function %24 - %res = OpVariable %_ptr_Function_v4int Function %38 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_int Function %25 + %res = OpVariable %_ptr_Function_v4int Function %39 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %int %arg_3 - %26 = OpImageFetch %v4int %28 %34 Lod %35 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpCompositeExtract %int %31 0 + %33 = OpCompositeExtract %int %31 1 + %34 = OpLoad %int %arg_2 + %35 = OpCompositeConstruct %v3int %32 %33 %34 + %36 = OpLoad %int %arg_3 + %27 = OpImageFetch %v4int %29 %35 Lod %36 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_79e697 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_79e697 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureLoad_79e697 + %49 = OpLabel + %50 = OpFunctionCall %void %textureLoad_79e697 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_79e697 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_79e697 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl index 9058ac44ee..bdb2708ea9 100644 --- a/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/79e697.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_79e697() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl index 5fe7c16aac..c1d6e7ef5f 100644 --- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_7ab4df() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl index ec196f0b54..0ebf6752fe 100644 --- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7ab4df() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl index ec196f0b54..0ebf6752fe 100644 --- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7ab4df() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; uint4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl index d1ac2431b3..04a6f05a9e 100644 --- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_7ab4df() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl index 1cacb69723..2c10622c19 100644 --- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7ab4df(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; int arg_3 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm index e118067f80..a753d7ac49 100644 --- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,60 +42,61 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint - %int_1 = OpConstant %int 1 + %27 = OpConstantNull %uint %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %43 = OpConstantNull %v4uint - %44 = OpTypeFunction %v4float + %44 = OpConstantNull %v4uint + %45 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7ab4df = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %29 - %res = OpVariable %_ptr_Function_v4uint Function %43 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %44 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2int %arg_1 - %35 = OpCompositeExtract %int %34 0 - %36 = OpCompositeExtract %int %34 1 - %38 = OpLoad %uint %arg_2 - %37 = OpBitcast %int %38 - %39 = OpCompositeConstruct %v3int %35 %36 %37 - %40 = OpLoad %int %arg_3 - %30 = OpImageFetch %v4uint %32 %39 Lod %40 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %int %arg_3 + %31 = OpImageFetch %v4uint %33 %40 Lod %41 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_7ab4df +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_7ab4df OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_7ab4df + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_7ab4df OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %56 = OpLabel - %57 = OpFunctionCall %void %textureLoad_7ab4df + %57 = OpLabel + %58 = OpFunctionCall %void %textureLoad_7ab4df OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl index f4aa72ef3a..a11042ccfb 100644 --- a/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7ab4df.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_7ab4df() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl index 19901a0c54..a3ef4db69b 100644 --- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: u32) -> f32 fn textureLoad_7b63e0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl index 54f384ab8a..7c6acb6bf6 100644 --- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7b63e0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl index 54f384ab8a..7c6acb6bf6 100644 --- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7b63e0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; float res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl index a024f9ce56..c9a432bb9c 100644 --- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_7b63e0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl index 31ac2ebc09..dc75d169f6 100644 --- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7b63e0(depth2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; uint arg_3 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm index ae0386ba97..2409080830 100644 --- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,55 +41,56 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v3uint = OpTypeVector %uint 3 %_ptr_Function_float = OpTypePointer Function %float - %38 = OpTypeFunction %v4float + %39 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7b63e0 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_uint Function %25 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %uint %arg_3 - %27 = OpImageFetch %v4float %28 %34 Lod %35 - %26 = OpCompositeExtract %float %27 0 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpCompositeExtract %uint %31 0 + %33 = OpCompositeExtract %uint %31 1 + %34 = OpLoad %uint %arg_2 + %35 = OpCompositeConstruct %v3uint %32 %33 %34 + %36 = OpLoad %uint %arg_3 + %28 = OpImageFetch %v4float %29 %35 Lod %36 + %27 = OpCompositeExtract %float %28 0 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_7b63e0 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_7b63e0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureLoad_7b63e0 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_7b63e0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_7b63e0 + %51 = OpLabel + %52 = OpFunctionCall %void %textureLoad_7b63e0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl index 6839f8c33e..c888b5a7e0 100644 --- a/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7b63e0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_7b63e0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl index d6db0ca988..4c324975d9 100644 --- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_7bee94() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl index d9e05667ec..31352a9d8a 100644 --- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_7bee94() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl index d9e05667ec..31352a9d8a 100644 --- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_7bee94() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl index e876cbec41..424a6ef125 100644 --- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_7bee94() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl index 19eca236ac..0f5165f24a 100644 --- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7bee94(texture2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm index e191d646eb..3018fee07c 100644 --- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,51 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7bee94 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4int Function %35 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4int %28 %29 Sample %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4int %30 %31 Sample %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_7bee94 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_7bee94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_7bee94 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_7bee94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_7bee94 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_7bee94 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl index 7cc012fb57..ef3b813d2b 100644 --- a/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7bee94.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_7bee94() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl index e27eaa7e91..c2ea7d267e 100644 --- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_7c90e5() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl index 8ba297802b..d017a032b8 100644 --- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7c90e5() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl index 8ba297802b..d017a032b8 100644 --- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_7c90e5() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; uint4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl index 4be88a2a7e..cbc50b7ac9 100644 --- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_7c90e5() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl index d84b8ed553..126dc809f6 100644 --- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7c90e5(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; int arg_3 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm index 37a98bf670..73dae194a7 100644 --- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,56 +42,57 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %39 = OpConstantNull %v4uint - %40 = OpTypeFunction %v4float + %40 = OpConstantNull %v4uint + %41 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7c90e5 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %39 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %arg_3 = OpVariable %_ptr_Function_int Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %40 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %34 = OpLoad %int %arg_2 - %35 = OpCompositeConstruct %v3int %32 %33 %34 - %36 = OpLoad %int %arg_3 - %27 = OpImageFetch %v4uint %29 %35 Lod %36 - OpStore %res %27 + %30 = OpLoad %11 %arg_0 + %32 = OpLoad %v2int %arg_1 + %33 = OpCompositeExtract %int %32 0 + %34 = OpCompositeExtract %int %32 1 + %35 = OpLoad %int %arg_2 + %36 = OpCompositeConstruct %v3int %33 %34 %35 + %37 = OpLoad %int %arg_3 + %28 = OpImageFetch %v4uint %30 %36 Lod %37 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_7c90e5 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_7c90e5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureLoad_7c90e5 + %50 = OpLabel + %51 = OpFunctionCall %void %textureLoad_7c90e5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_7c90e5 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_7c90e5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl index d6a928688c..e4c71060d8 100644 --- a/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7c90e5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_7c90e5() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl index 40c010488b..7d7c93acb4 100644 --- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: i32) -> f32 fn textureLoad_7fd822() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl index 56cd912726..3fbe2bbe10 100644 --- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_7fd822() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float res = arg_0.Load(uint3(arg_1, uint(arg_2))).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl index 56cd912726..3fbe2bbe10 100644 --- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_7fd822() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float res = arg_0.Load(uint3(arg_1, uint(arg_2))).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl index 5525b53651..0b1843c443 100644 --- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_7fd822() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl index fbc1807cc2..7b23746fb7 100644 --- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_7fd822(depth2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.spvasm index dcd33aeb5d..ded61b9b55 100644 --- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,51 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_7fd822 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %int %arg_2 - %27 = OpImageFetch %v4float %28 %29 Lod %30 - %26 = OpCompositeExtract %float %27 0 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpLoad %int %arg_2 + %29 = OpImageFetch %v4float %30 %31 Lod %32 + %28 = OpCompositeExtract %float %29 0 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_7fd822 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_7fd822 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_7fd822 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_7fd822 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_7fd822 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_7fd822 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl index 90a4a66ca4..64bd80e1eb 100644 --- a/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/7fd822.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_7fd822() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl index 4ef1d0b858..b9a6c49d22 100644 --- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_84dee1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl index 7ab5799f1d..ddbcaca7b4 100644 --- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_84dee1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float4 res = arg_0.Load(uint3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl index 7ab5799f1d..ddbcaca7b4 100644 --- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_84dee1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float4 res = arg_0.Load(uint3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl index 6706ec12e3..0cf16923d2 100644 --- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_84dee1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl index 545f668085..c2a83c62e3 100644 --- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_84dee1(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm index d1c06a61f4..8126b56e27 100644 --- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,47 +40,48 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_84dee1 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2uint %arg_1 - %28 = OpLoad %uint %arg_2 - %25 = OpImageFetch %v4float %26 %27 Lod %28 - OpStore %res %25 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %v2uint %arg_1 + %29 = OpLoad %uint %arg_2 + %26 = OpImageFetch %v4float %27 %28 Lod %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureLoad_84dee1 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_84dee1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_84dee1 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_84dee1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_84dee1 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_84dee1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl index 850b0fe964..20c09d3ddb 100644 --- a/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/84dee1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_84dee1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl index 3e96430c59..9bcc0f9cf9 100644 --- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_8527b1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl index e084b64d8e..a8eedffac1 100644 --- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_8527b1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl index e084b64d8e..a8eedffac1 100644 --- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_8527b1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl index 01a6c24a02..3a7abdce97 100644 --- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_8527b1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl index c84a2371d6..b8f246d4d3 100644 --- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_8527b1(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; uint arg_3 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm index e8edef0ba7..7894494f84 100644 --- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,57 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %38 = OpConstantNull %v4uint - %39 = OpTypeFunction %v4float + %39 = OpConstantNull %v4uint + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_8527b1 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_uint Function %24 - %res = OpVariable %_ptr_Function_v4uint Function %38 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_uint Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %39 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %uint %arg_3 - %26 = OpImageFetch %v4uint %28 %34 Lod %35 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpCompositeExtract %uint %31 0 + %33 = OpCompositeExtract %uint %31 1 + %34 = OpLoad %uint %arg_2 + %35 = OpCompositeConstruct %v3uint %32 %33 %34 + %36 = OpLoad %uint %arg_3 + %27 = OpImageFetch %v4uint %29 %35 Lod %36 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_8527b1 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_8527b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureLoad_8527b1 + %49 = OpLabel + %50 = OpFunctionCall %void %textureLoad_8527b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_8527b1 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_8527b1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl index 2f2f110597..68a89fea40 100644 --- a/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/8527b1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_8527b1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl index 9f3e2bc4c8..703671b786 100644 --- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: i32) -> vec4 fn textureLoad_87be85() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl index 4957401568..e2e2ecc1ff 100644 --- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_87be85() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; float4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl index 4957401568..e2e2ecc1ff 100644 --- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_87be85() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; float4 res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl index 3bea7e3099..46621b3d0a 100644 --- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_87be85() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl index c0f13cfdff..5c043b9682 100644 --- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_87be85(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; int arg_3 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm index aebef8a53e..fa7cb5cf6b 100644 --- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,55 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v3int = OpTypeVector %int 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %37 = OpTypeFunction %v4float + %38 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_87be85 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_int Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %27 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpCompositeExtract %int %29 0 - %31 = OpCompositeExtract %int %29 1 - %32 = OpLoad %int %arg_2 - %33 = OpCompositeConstruct %v3int %30 %31 %32 - %34 = OpLoad %int %arg_3 - %26 = OpImageFetch %v4float %27 %33 Lod %34 - OpStore %res %26 + %28 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpCompositeExtract %int %30 0 + %32 = OpCompositeExtract %int %30 1 + %33 = OpLoad %int %arg_2 + %34 = OpCompositeConstruct %v3int %31 %32 %33 + %35 = OpLoad %int %arg_3 + %27 = OpImageFetch %v4float %28 %34 Lod %35 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_87be85 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_87be85 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_87be85 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_87be85 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %49 = OpLabel - %50 = OpFunctionCall %void %textureLoad_87be85 + %50 = OpLabel + %51 = OpFunctionCall %void %textureLoad_87be85 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl index a98432a12a..79c613751d 100644 --- a/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/87be85.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_87be85() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl index cf0ac2324f..d2e7b87f50 100644 --- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_897cf3() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl index 7f68c6d123..e943ee452d 100644 --- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_897cf3() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(uint3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl index 7f68c6d123..e943ee452d 100644 --- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_897cf3() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(uint3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl index 4c8f3f2e1e..603face905 100644 --- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_897cf3() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl index 004547d0c6..4ebbf9b9b9 100644 --- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_897cf3(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm index 43e8cfbd67..b62cf69459 100644 --- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,50 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %32 = OpConstantNull %v4uint - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_897cf3 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %res = OpVariable %_ptr_Function_v4uint Function %32 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %res = OpVariable %_ptr_Function_v4uint Function %33 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %uint %arg_2 - %25 = OpImageFetch %v4uint %27 %28 Lod %29 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %uint %arg_2 + %26 = OpImageFetch %v4uint %28 %29 Lod %30 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_897cf3 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_897cf3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_897cf3 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_897cf3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_897cf3 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_897cf3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl index a690f920b5..5739639237 100644 --- a/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/897cf3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_897cf3() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl index fe475137b4..4fd4ae8d11 100644 --- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_external, coords: vec2) -> vec4 fn textureLoad_8acf41() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var res: vec4 = textureLoad(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl index 4661657d0b..6b424608be 100644 --- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.dxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_8acf41() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl index 4661657d0b..6b424608be 100644 --- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.fxc.hlsl @@ -80,7 +80,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureLoad_8acf41() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; float4 res = textureLoadExternal(arg_0, ext_tex_plane_1, arg_1, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl index e81af144de..0a17c6787d 100644 --- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.glsl @@ -49,7 +49,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner); } @@ -118,7 +118,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner); } @@ -181,7 +181,7 @@ vec4 textureLoadExternal(highp sampler2D plane0_1, highp sampler2D plane1_1, ive uniform highp sampler2D arg_0_1; uniform highp sampler2D ext_tex_plane_1_1; void textureLoad_8acf41() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); vec4 res = textureLoadExternal(arg_0_1, ext_tex_plane_1_1, arg_1, ext_tex_params.inner); } diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.msl index d6fff77b9f..8806d2f828 100644 --- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.msl @@ -58,7 +58,7 @@ float4 textureLoadExternal(texture2d plane0, texture2d tint_symbol_1, texture2d tint_symbol_2, const constant ExternalTextureParams* const tint_symbol_3) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); float4 res = textureLoadExternal(tint_symbol_1, tint_symbol_2, arg_1, *(tint_symbol_3)); } diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm index 350a2017c5..41ba458ed6 100644 --- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 141 +; Bound: 143 ; Schema: 0 OpCapability Shader %28 = OpExtInstImport "GLSL.std.450" @@ -115,12 +115,14 @@ %93 = OpConstantNull %uint %void = OpTypeVoid %111 = OpTypeFunction %void - %115 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %116 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %119 = OpConstantNull %v2int %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %128 = OpTypeFunction %v4float + %130 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %22 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -214,37 +216,37 @@ OpFunctionEnd %textureLoad_8acf41 = OpFunction %void None %111 %114 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %115 + %arg_1 = OpVariable %_ptr_Function_v2int Function %119 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %115 - %119 = OpLoad %11 %arg_0 - %120 = OpLoad %11 %ext_tex_plane_1 - %121 = OpLoad %v2int %arg_1 - %124 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %125 = OpLoad %ExternalTextureParams %124 - %118 = OpFunctionCall %v4float %textureLoadExternal %119 %120 %121 %125 - OpStore %res %118 + OpStore %arg_1 %116 + %121 = OpLoad %11 %arg_0 + %122 = OpLoad %11 %ext_tex_plane_1 + %123 = OpLoad %v2int %arg_1 + %126 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %127 = OpLoad %ExternalTextureParams %126 + %120 = OpFunctionCall %v4float %textureLoadExternal %121 %122 %123 %127 + OpStore %res %120 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %128 - %130 = OpLabel - %131 = OpFunctionCall %void %textureLoad_8acf41 +%vertex_main_inner = OpFunction %v4float None %130 + %132 = OpLabel + %133 = OpFunctionCall %void %textureLoad_8acf41 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %111 - %133 = OpLabel - %134 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %134 + %135 = OpLabel + %136 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %136 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %111 - %136 = OpLabel - %137 = OpFunctionCall %void %textureLoad_8acf41 + %138 = OpLabel + %139 = OpFunctionCall %void %textureLoad_8acf41 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %111 - %139 = OpLabel - %140 = OpFunctionCall %void %textureLoad_8acf41 + %141 = OpLabel + %142 = OpFunctionCall %void %textureLoad_8acf41 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl index 09bc01249d..90bedea6e7 100644 --- a/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/8acf41.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_external; fn textureLoad_8acf41() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var res : vec4 = textureLoad(arg_0, arg_1); } diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl index 63dcd781e0..4db4f0facf 100644 --- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: u32) -> f32 fn textureLoad_8ccbe3() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl index 5eb8359211..cfaa7450a4 100644 --- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_8ccbe3() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float res = arg_0.Load(int3(arg_1, int(arg_2))).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl index 5eb8359211..cfaa7450a4 100644 --- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_8ccbe3() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float res = arg_0.Load(int3(arg_1, int(arg_2))).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl index b4a68c5e02..658298a104 100644 --- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_8ccbe3() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; float res = texelFetch(arg_0_1, arg_1, int(arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl index 0dcde10ff5..c2a25ed639 100644 --- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_8ccbe3(depth2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.spvasm index fdd09622c6..28a28a5e8e 100644 --- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,51 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_8ccbe3 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %uint %arg_2 - %27 = OpImageFetch %v4float %28 %29 Lod %30 - %26 = OpCompositeExtract %float %27 0 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpLoad %uint %arg_2 + %29 = OpImageFetch %v4float %30 %31 Lod %32 + %28 = OpCompositeExtract %float %29 0 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_8ccbe3 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_8ccbe3 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_8ccbe3 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_8ccbe3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl index 570441efc7..0277d7eba5 100644 --- a/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/8ccbe3.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_8ccbe3() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl index 3b82476d0a..cf4aad9942 100644 --- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_92eb1f() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl index a369376144..fc35c273f2 100644 --- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_92eb1f() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; int arg_2 = 1; uint4 res = arg_0.Load(uint4(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl index a369376144..fc35c273f2 100644 --- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_92eb1f() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; int arg_2 = 1; uint4 res = arg_0.Load(uint4(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl index 6784cfec89..50d73c19d2 100644 --- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_92eb1f() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl index b31aa86e5a..d6f31ed52b 100644 --- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_92eb1f(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); + uint3 arg_1 = uint3(1u); int arg_2 = 1; uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm index 279e5939e8..185df10617 100644 --- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,50 +40,52 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %22 = OpConstantNull %v3uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_92eb1f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %35 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v3uint %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v3uint %arg_1 + %32 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4uint %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_92eb1f +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_92eb1f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_92eb1f + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_92eb1f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_92eb1f + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_92eb1f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl index 4a8be7fae0..8180d4b563 100644 --- a/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/92eb1f.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_92eb1f() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl index 7dd1032f5e..a7c6f4cd4d 100644 --- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_96efd5() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl index 06c757a772..f4d0e5dd0c 100644 --- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_96efd5() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl index 06c757a772..f4d0e5dd0c 100644 --- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_96efd5() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl index 1949301d00..6503ab3799 100644 --- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_96efd5() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl index 56325e36cd..2ab66e76d1 100644 --- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_96efd5(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; uint arg_3 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm index 7529e7ecae..296c3a29e2 100644 --- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,55 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %37 = OpTypeFunction %v4float + %38 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_96efd5 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_uint Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %27 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpCompositeExtract %uint %29 0 - %31 = OpCompositeExtract %uint %29 1 - %32 = OpLoad %uint %arg_2 - %33 = OpCompositeConstruct %v3uint %30 %31 %32 - %34 = OpLoad %uint %arg_3 - %26 = OpImageFetch %v4float %27 %33 Lod %34 - OpStore %res %26 + %28 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpCompositeExtract %uint %30 0 + %32 = OpCompositeExtract %uint %30 1 + %33 = OpLoad %uint %arg_2 + %34 = OpCompositeConstruct %v3uint %31 %32 %33 + %35 = OpLoad %uint %arg_3 + %27 = OpImageFetch %v4float %28 %34 Lod %35 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %37 - %39 = OpLabel - %40 = OpFunctionCall %void %textureLoad_96efd5 +%vertex_main_inner = OpFunction %v4float None %38 + %40 = OpLabel + %41 = OpFunctionCall %void %textureLoad_96efd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %42 = OpLabel - %43 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %43 + %43 = OpLabel + %44 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %44 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_96efd5 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_96efd5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %49 = OpLabel - %50 = OpFunctionCall %void %textureLoad_96efd5 + %50 = OpLabel + %51 = OpFunctionCall %void %textureLoad_96efd5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl index 1dd4f6c062..11a80a3d14 100644 --- a/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/96efd5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_96efd5() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl index 61e56bd112..d762cb64c8 100644 --- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_9885b0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl index 70b8ef57e4..a6ce9ebfc2 100644 --- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9885b0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl index 70b8ef57e4..a6ce9ebfc2 100644 --- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9885b0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; uint arg_3 = 1u; int4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl index 6ecf66cbd0..65bdb59ca0 100644 --- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_9885b0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl index 2f75ea8073..58b45be8d3 100644 --- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9885b0(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; uint arg_3 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm index 6faf53b4d4..bae79edb43 100644 --- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,56 +42,57 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %39 = OpConstantNull %v4int - %40 = OpTypeFunction %v4float + %40 = OpConstantNull %v4int + %41 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9885b0 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %39 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %arg_3 = OpVariable %_ptr_Function_uint Function %26 + %res = OpVariable %_ptr_Function_v4int Function %40 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %34 = OpLoad %uint %arg_2 - %35 = OpCompositeConstruct %v3uint %32 %33 %34 - %36 = OpLoad %uint %arg_3 - %27 = OpImageFetch %v4int %29 %35 Lod %36 - OpStore %res %27 + %30 = OpLoad %11 %arg_0 + %32 = OpLoad %v2uint %arg_1 + %33 = OpCompositeExtract %uint %32 0 + %34 = OpCompositeExtract %uint %32 1 + %35 = OpLoad %uint %arg_2 + %36 = OpCompositeConstruct %v3uint %33 %34 %35 + %37 = OpLoad %uint %arg_3 + %28 = OpImageFetch %v4int %30 %36 Lod %37 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_9885b0 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_9885b0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureLoad_9885b0 + %50 = OpLabel + %51 = OpFunctionCall %void %textureLoad_9885b0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_9885b0 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_9885b0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl index 0ac04002fd..a7fa0f54ff 100644 --- a/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9885b0.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_9885b0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl index 8e27058d64..9311ce9e7c 100644 --- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_9aa733() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl index 34e1a1c49f..25e382bbfe 100644 --- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9aa733() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int4 res = arg_0.Load(uint3(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl index 34e1a1c49f..25e382bbfe 100644 --- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9aa733() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int4 res = arg_0.Load(uint3(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl index cec5f4bc61..1681f07b6c 100644 --- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_9aa733() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl index 31eb5f502b..4afc04aa3f 100644 --- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9aa733(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm index 1c67aef2f2..4e86f2f4f9 100644 --- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,51 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9aa733 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4int Function %35 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4int %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4int %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_9aa733 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_9aa733 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_9aa733 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_9aa733 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_9aa733 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_9aa733 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl index 2b8e1a8ff4..26e1377a75 100644 --- a/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9aa733.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_9aa733() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl index d9e6797a80..f471aef416 100644 --- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: i32) -> f32 fn textureLoad_9b2667() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl index e2a1981249..9376a83dc8 100644 --- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9b2667() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; float res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl index e2a1981249..9376a83dc8 100644 --- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9b2667() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int arg_3 = 1; float res = arg_0.Load(int4(int3(arg_1, arg_2), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl index b234f6fe57..b488ee0d8a 100644 --- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_9b2667() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), arg_3).x; diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl index 6db3ff189d..8208bb5181 100644 --- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9b2667(depth2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; int arg_3 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm index 7ceb14a82e..f42aff61cd 100644 --- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,55 +41,56 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v3int = OpTypeVector %int 3 %_ptr_Function_float = OpTypePointer Function %float - %38 = OpTypeFunction %v4float + %39 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9b2667 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_int Function %25 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %int %arg_3 - %27 = OpImageFetch %v4float %28 %34 Lod %35 - %26 = OpCompositeExtract %float %27 0 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpCompositeExtract %int %31 0 + %33 = OpCompositeExtract %int %31 1 + %34 = OpLoad %int %arg_2 + %35 = OpCompositeConstruct %v3int %32 %33 %34 + %36 = OpLoad %int %arg_3 + %28 = OpImageFetch %v4float %29 %35 Lod %36 + %27 = OpCompositeExtract %float %28 0 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_9b2667 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_9b2667 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureLoad_9b2667 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_9b2667 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_9b2667 + %51 = OpLabel + %52 = OpFunctionCall %void %textureLoad_9b2667 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl index 4c86d4948a..9da65bebba 100644 --- a/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9b2667.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_9b2667() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl index 530c1e14fe..b610e532ff 100644 --- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_9d70e9() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl index 3a3134ef45..e7d5bc4ec1 100644 --- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9d70e9() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; int4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl index 3a3134ef45..e7d5bc4ec1 100644 --- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9d70e9() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; int4 res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl index 65a8f749fa..d3f7231856 100644 --- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_9d70e9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl index 0bbe65d25c..f374faa0e9 100644 --- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9d70e9(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; uint arg_3 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm index d0c1157c30..dcd5718f94 100644 --- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,60 +41,61 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %42 = OpConstantNull %v4int - %43 = OpTypeFunction %v4float + %43 = OpConstantNull %v4int + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9d70e9 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 - %res = OpVariable %_ptr_Function_v4int Function %42 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4int Function %43 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2int %arg_1 - %35 = OpCompositeExtract %int %34 0 - %36 = OpCompositeExtract %int %34 1 - %37 = OpLoad %int %arg_2 - %38 = OpCompositeConstruct %v3int %35 %36 %37 - %39 = OpLoad %uint %arg_3 - %30 = OpImageFetch %v4int %32 %38 Lod %39 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %38 = OpLoad %int %arg_2 + %39 = OpCompositeConstruct %v3int %36 %37 %38 + %40 = OpLoad %uint %arg_3 + %31 = OpImageFetch %v4int %33 %39 Lod %40 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_9d70e9 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_9d70e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_9d70e9 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_9d70e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %55 = OpLabel - %56 = OpFunctionCall %void %textureLoad_9d70e9 + %56 = OpLabel + %57 = OpFunctionCall %void %textureLoad_9d70e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl index 673276819b..ea77eb9534 100644 --- a/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9d70e9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_9d70e9() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl index 48c2b12161..9db0b272b3 100644 --- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d, coords: vec2, level: u32) -> f32 fn textureLoad_9ed19e() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl index 90bb9c351e..37dbf5fb0d 100644 --- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9ed19e() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float res = arg_0.Load(uint3(arg_1, arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl index 90bb9c351e..37dbf5fb0d 100644 --- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_9ed19e() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; float res = arg_0.Load(uint3(arg_1, arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl index 43575c665e..6cb2a0e4af 100644 --- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2D arg_0_1; void textureLoad_9ed19e() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; float res = texelFetch(arg_0_1, ivec2(arg_1), int(arg_2)).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl index e85b151d05..cea169ff61 100644 --- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9ed19e(depth2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm index aa66bcb808..3e84bf3c54 100644 --- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,49 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %32 = OpTypeFunction %v4float + %33 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9ed19e = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4float %27 %28 Lod %29 - %25 = OpCompositeExtract %float %26 0 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %uint %arg_2 + %27 = OpImageFetch %v4float %28 %29 Lod %30 + %26 = OpCompositeExtract %float %27 0 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_9ed19e +%vertex_main_inner = OpFunction %v4float None %33 + %35 = OpLabel + %36 = OpFunctionCall %void %textureLoad_9ed19e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %38 = OpLabel + %39 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %39 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_9ed19e + %42 = OpLabel + %43 = OpFunctionCall %void %textureLoad_9ed19e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_9ed19e + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_9ed19e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl index b50d5ff8ca..3a370c0819 100644 --- a/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9ed19e.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d; fn textureLoad_9ed19e() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl index 02530d25f9..b58b2f911f 100644 --- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: u32) -> vec4 fn textureLoad_9fbfd9() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl index 6878a77dc4..d289237f96 100644 --- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9fbfd9() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl index 6878a77dc4..d289237f96 100644 --- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_9fbfd9() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint arg_3 = 1u; int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), int(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl index 805dfe5ee4..e5225ef287 100644 --- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_9fbfd9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uint arg_3 = 1u; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl index 89526cc33c..e51e7d483a 100644 --- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_9fbfd9(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; uint arg_3 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm index f5b5c54448..66ff86bbd8 100644 --- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,58 +41,60 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %40 = OpConstantNull %v4int - %41 = OpTypeFunction %v4float + %42 = OpConstantNull %v4int + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_9fbfd9 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %40 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4int Function %42 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %uint_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %uint %arg_3 - %27 = OpImageFetch %v4int %29 %36 Lod %37 - OpStore %res %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %37 = OpLoad %uint %arg_2 + %36 = OpBitcast %int %37 + %38 = OpCompositeConstruct %v3int %34 %35 %36 + %39 = OpLoad %uint %arg_3 + %29 = OpImageFetch %v4int %31 %38 Lod %39 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_9fbfd9 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_9fbfd9 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_9fbfd9 + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_9fbfd9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl index 17e197a55c..22965407a2 100644 --- a/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/9fbfd9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_9fbfd9() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl index db3610e958..948a8bd9e0 100644 --- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: i32, level: u32) -> vec4 fn textureLoad_a24be1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl index e5c26fbaf6..077a798efb 100644 --- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_a24be1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl index e5c26fbaf6..077a798efb 100644 --- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_a24be1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint arg_3 = 1u; uint4 res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl index 6f0bc3fec4..1fcbb3212c 100644 --- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); @@ -26,7 +26,7 @@ precision mediump float; uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); @@ -44,7 +44,7 @@ void main() { uniform highp usampler2DArray arg_0_1; void textureLoad_a24be1() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uint arg_3 = 1u; uvec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), int(arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl index 062190a890..8bceee3ed1 100644 --- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a24be1(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; uint arg_3 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm index 71d425b420..a6228e39b0 100644 --- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,61 +41,62 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int - %uint_1 = OpConstant %uint 1 + %27 = OpConstantNull %int %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %43 = OpConstantNull %v4uint - %44 = OpTypeFunction %v4float + %44 = OpConstantNull %v4uint + %45 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_a24be1 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 - %res = OpVariable %_ptr_Function_v4uint Function %43 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 + %res = OpVariable %_ptr_Function_v4uint Function %44 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2uint %arg_1 - %35 = OpCompositeExtract %uint %34 0 - %36 = OpCompositeExtract %uint %34 1 - %38 = OpLoad %int %arg_2 - %37 = OpBitcast %uint %38 - %39 = OpCompositeConstruct %v3uint %35 %36 %37 - %40 = OpLoad %uint %arg_3 - %30 = OpImageFetch %v4uint %32 %39 Lod %40 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %uint %arg_3 + %31 = OpImageFetch %v4uint %33 %40 Lod %41 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_a24be1 +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_a24be1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_a24be1 + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_a24be1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %56 = OpLabel - %57 = OpFunctionCall %void %textureLoad_a24be1 + %57 = OpLabel + %58 = OpFunctionCall %void %textureLoad_a24be1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl index 024ec51ca1..e321579549 100644 --- a/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/a24be1.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_a24be1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl index 185b1bb3a4..069210481a 100644 --- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_a583c9() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl index c8c40f9263..cf72504d42 100644 --- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_a583c9() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl index c8c40f9263..cf72504d42 100644 --- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_a583c9() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl index 2d7faeccad..cd799300e6 100644 --- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_a583c9() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl index 666d009f2f..285b7569a1 100644 --- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a583c9(texture2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.spvasm index c9e24f9b84..b62cc21374 100644 --- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,47 +40,48 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %_ptr_Function_v4float = OpTypePointer Function %v4float - %31 = OpTypeFunction %v4float + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_a583c9 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2int %arg_1 - %28 = OpLoad %int %arg_2 - %25 = OpImageFetch %v4float %26 %27 Sample %28 - OpStore %res %25 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %v2int %arg_1 + %29 = OpLoad %int %arg_2 + %26 = OpImageFetch %v4float %27 %28 Sample %29 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %31 - %33 = OpLabel - %34 = OpFunctionCall %void %textureLoad_a583c9 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureLoad_a583c9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %37 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %40 = OpLabel - %41 = OpFunctionCall %void %textureLoad_a583c9 + %41 = OpLabel + %42 = OpFunctionCall %void %textureLoad_a583c9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_a583c9 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_a583c9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl index 8a73dde876..bae2e0d11c 100644 --- a/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/a583c9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_a583c9() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl index dde727d180..8769abebff 100644 --- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_a9a9f5() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl index 2d066b2686..e3ec6e8ba8 100644 --- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_a9a9f5() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; int arg_2 = 1; uint4 res = arg_0.Load(int4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl index 2d066b2686..e3ec6e8ba8 100644 --- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_a9a9f5() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; int arg_2 = 1; uint4 res = arg_0.Load(int4(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl index bc870585a3..cfa42c4c2d 100644 --- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler3D arg_0_1; void textureLoad_a9a9f5() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl index 7362d1e7b3..dd765b4a55 100644 --- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_a9a9f5(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); + int3 arg_1 = int3(1); int arg_2 = 1; uint4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.spvasm index 30a191356a..51d546712a 100644 --- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,50 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int -%_ptr_Function_v3int = OpTypePointer Function %v3int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1 +%_ptr_Function_v3int = OpTypePointer Function %v3int + %23 = OpConstantNull %v3int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v4uint + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_a9a9f5 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v3int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %34 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v3int %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Lod %30 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %int %arg_2 + %27 = OpImageFetch %v4uint %29 %30 Lod %31 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_a9a9f5 +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_a9a9f5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_a9a9f5 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_a9a9f5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_a9a9f5 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_a9a9f5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl index 6c0be9b825..3b9b743cb6 100644 --- a/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/a9a9f5.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_a9a9f5() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl index 0160d1b64c..7030cca59f 100644 --- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_b29f71() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl index 5f94bd4ff4..eb30fedbfc 100644 --- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b29f71() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl index 5f94bd4ff4..eb30fedbfc 100644 --- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b29f71() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; int4 res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)); diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl index 5ee7aa68a3..85fdeb5aed 100644 --- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp isampler2DArray arg_0_1; void textureLoad_b29f71() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; ivec4 res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl index 223e7ece6d..2900129a8d 100644 --- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b29f71(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; int arg_3 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm index b410a5b723..b72126de73 100644 --- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 58 +; Bound: 59 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,61 +41,62 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint - %int_1 = OpConstant %int 1 + %27 = OpConstantNull %uint %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v4int = OpTypeVector %int 4 %v3int = OpTypeVector %int 3 %_ptr_Function_v4int = OpTypePointer Function %v4int - %43 = OpConstantNull %v4int - %44 = OpTypeFunction %v4float + %44 = OpConstantNull %v4int + %45 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b29f71 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %29 - %res = OpVariable %_ptr_Function_v4int Function %43 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %30 + %res = OpVariable %_ptr_Function_v4int Function %44 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2int %arg_1 - %35 = OpCompositeExtract %int %34 0 - %36 = OpCompositeExtract %int %34 1 - %38 = OpLoad %uint %arg_2 - %37 = OpBitcast %int %38 - %39 = OpCompositeConstruct %v3int %35 %36 %37 - %40 = OpLoad %int %arg_3 - %30 = OpImageFetch %v4int %32 %39 Lod %40 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %int %arg_3 + %31 = OpImageFetch %v4int %33 %40 Lod %41 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %44 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_b29f71 +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_b29f71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %50 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_b29f71 + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_b29f71 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %56 = OpLabel - %57 = OpFunctionCall %void %textureLoad_b29f71 + %57 = OpLabel + %58 = OpFunctionCall %void %textureLoad_b29f71 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl index 4e61327be8..fe9529b908 100644 --- a/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b29f71.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_b29f71() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl index aa852d0eb7..04014e1a8b 100644 --- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: i32) -> f32 fn textureLoad_b6ba5d() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl index 3be54d2e52..3cf192a504 100644 --- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b6ba5d() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl index 3be54d2e52..3cf192a504 100644 --- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_b6ba5d() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; int arg_3 = 1; float res = arg_0.Load(uint4(uint3(arg_1, uint(arg_2)), uint(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl index 47755bc5ca..551eb085dc 100644 --- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_b6ba5d() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, uint(arg_2))), arg_3).x; diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl index fa0087d9a5..5a97ce589a 100644 --- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b6ba5d(depth2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; int arg_3 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm index 836e869bdf..f2a68b4464 100644 --- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,57 +41,59 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v3uint = OpTypeVector %uint 3 %_ptr_Function_float = OpTypePointer Function %float - %40 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b6ba5d = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %27 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %int_1 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %int %arg_3 - %28 = OpImageFetch %v4float %29 %36 Lod %37 - %27 = OpCompositeExtract %float %28 0 - OpStore %res %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %37 = OpLoad %int %arg_2 + %36 = OpBitcast %uint %37 + %38 = OpCompositeConstruct %v3uint %34 %35 %36 + %39 = OpLoad %int %arg_3 + %30 = OpImageFetch %v4float %31 %38 Lod %39 + %29 = OpCompositeExtract %float %30 0 + OpStore %res %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_b6ba5d +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_b6ba5d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %49 = OpLabel - %50 = OpFunctionCall %void %textureLoad_b6ba5d + %51 = OpLabel + %52 = OpFunctionCall %void %textureLoad_b6ba5d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_b6ba5d + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_b6ba5d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl index a22310afb5..626f638bd7 100644 --- a/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b6ba5d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_b6ba5d() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var arg_3 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl index af3e1254e3..19912f4c8d 100644 --- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_b73f6b() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl index b67edf58fb..9d88185193 100644 --- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_b73f6b() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint4 res = arg_0.Load(uint3(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl index b67edf58fb..9d88185193 100644 --- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_b73f6b() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint4 res = arg_0.Load(uint3(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl index cf211c34c9..12f1e439a9 100644 --- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_b73f6b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl index a90671632b..bc90f5ee49 100644 --- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b73f6b(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm index f2fe7434c8..b6c79a0b52 100644 --- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,50 +40,52 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b73f6b = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %35 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4uint %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_b73f6b +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_b73f6b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_b73f6b + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_b73f6b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_b73f6b + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_b73f6b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl index 30acfd961f..5af4ac73d6 100644 --- a/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b73f6b.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_b73f6b() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl index c456a66702..23f0bbc625 100644 --- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_b75d4a() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl index eb82033bf9..74c096e4d4 100644 --- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_b75d4a() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl index eb82033bf9..74c096e4d4 100644 --- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_b75d4a() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl index 5cd617e5bf..adef08f146 100644 --- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_b75d4a() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; vec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl index 455295bb36..f58711fdd1 100644 --- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_b75d4a(texture2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm index fab352d979..8c131590c4 100644 --- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,50 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_b75d4a = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4float %27 %28 Sample %29 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4float %29 %30 Sample %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_b75d4a +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_b75d4a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_b75d4a + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_b75d4a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_b75d4a + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_b75d4a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl index ac0a4a01cc..61178072f4 100644 --- a/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/b75d4a.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_b75d4a() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl index 06c515e92a..3833450f38 100644 --- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: i32) -> vec4 fn textureLoad_bcbb3c() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl index 4f12d01f92..b196d9f427 100644 --- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_bcbb3c() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; int arg_2 = 1; float4 res = arg_0.Load(uint4(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl index 4f12d01f92..b196d9f427 100644 --- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_bcbb3c() { - uint3 arg_1 = (0u).xxx; + uint3 arg_1 = (1u).xxx; int arg_2 = 1; float4 res = arg_0.Load(uint4(arg_1, uint(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl index d0bf75e4dd..8f1cef3c7a 100644 --- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler3D arg_0_1; void textureLoad_bcbb3c() { - uvec3 arg_1 = uvec3(0u); + uvec3 arg_1 = uvec3(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl index 1a1301566b..fbd76f6bdb 100644 --- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_bcbb3c(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); + uint3 arg_1 = uint3(1u); int arg_2 = 1; float4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm index 85bba6813f..562f9f7d5d 100644 --- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,50 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %22 = OpConstantNull %v3uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_bcbb3c = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3uint %arg_1 - %29 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4float %27 %28 Lod %29 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3uint %arg_1 + %31 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4float %29 %30 Lod %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_bcbb3c +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_bcbb3c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_bcbb3c + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_bcbb3c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_bcbb3c + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_bcbb3c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl index 572a57cd63..23be82979a 100644 --- a/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/bcbb3c.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_bcbb3c() { - var arg_1 = vec3(); + var arg_1 = vec3(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl index 8f83affc08..ed1b9a92c4 100644 --- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: i32) -> f32 fn textureLoad_c16e00() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl index 4d0f985485..03e9cf6b06 100644 --- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_c16e00() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl index 4d0f985485..03e9cf6b06 100644 --- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_c16e00() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int arg_3 = 1; float res = arg_0.Load(int4(int3(arg_1, int(arg_2)), arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl index 31617d92d5..674994b3e9 100644 --- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_c16e00() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(arg_1, int(arg_2)), arg_3).x; diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl index bd6dd7b2a4..3b8aab435f 100644 --- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c16e00(depth2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; int arg_3 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm index d564db6279..a50dacf39a 100644 --- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 57 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,60 +41,61 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint - %int_1 = OpConstant %int 1 + %27 = OpConstantNull %uint %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v3int = OpTypeVector %int 3 %_ptr_Function_float = OpTypePointer Function %float - %43 = OpTypeFunction %v4float + %44 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_c16e00 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_int Function %30 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2int %arg_1 - %35 = OpCompositeExtract %int %34 0 - %36 = OpCompositeExtract %int %34 1 - %38 = OpLoad %uint %arg_2 - %37 = OpBitcast %int %38 - %39 = OpCompositeConstruct %v3int %35 %36 %37 - %40 = OpLoad %int %arg_3 - %31 = OpImageFetch %v4float %32 %39 Lod %40 - %30 = OpCompositeExtract %float %31 0 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %int %arg_3 + %32 = OpImageFetch %v4float %33 %40 Lod %41 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %43 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_c16e00 +%vertex_main_inner = OpFunction %v4float None %44 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_c16e00 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %49 + %49 = OpLabel + %50 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %50 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %52 = OpLabel - %53 = OpFunctionCall %void %textureLoad_c16e00 + %53 = OpLabel + %54 = OpFunctionCall %void %textureLoad_c16e00 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %55 = OpLabel - %56 = OpFunctionCall %void %textureLoad_c16e00 + %56 = OpLabel + %57 = OpFunctionCall %void %textureLoad_c16e00 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl index 766c6ef074..f9aff395f3 100644 --- a/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/c16e00.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_c16e00() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var arg_3 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl index dcb27ebd7d..5c4a300273 100644 --- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: i32) -> vec4 fn textureLoad_c2a480() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl index dcfad55434..24a7ffa5a8 100644 --- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_c2a480() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int4 res = arg_0.Load(int3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl index dcfad55434..24a7ffa5a8 100644 --- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_c2a480() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int4 res = arg_0.Load(int3(arg_1, arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl index 8002bc0c09..199eecb522 100644 --- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_c2a480() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl index 0d6cf6e025..3daa6a0c21 100644 --- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c2a480(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.spvasm index dbd659dd2e..cb4beee6a1 100644 --- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,50 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_c2a480 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %res = OpVariable %_ptr_Function_v4int Function %32 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %res = OpVariable %_ptr_Function_v4int Function %33 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %int %arg_2 - %25 = OpImageFetch %v4int %27 %28 Lod %29 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %int %arg_2 + %26 = OpImageFetch %v4int %28 %29 Lod %30 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_c2a480 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_c2a480 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_c2a480 + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_c2a480 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_c2a480 + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_c2a480 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl index 569a41bd86..f7bac9a583 100644 --- a/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/c2a480.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_c2a480() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl index 9c585acde9..091e0e5606 100644 --- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_c378ee() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl index 20193dae9a..2df89369ec 100644 --- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_c378ee() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl index 20193dae9a..2df89369ec 100644 --- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_c378ee() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl index 9d3f844571..e8e7b4c07f 100644 --- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_c378ee() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl index c6192ce47f..a8df92bf00 100644 --- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_c378ee(texture2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.spvasm index 190f4acf34..808c4e6cb6 100644 --- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,50 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %34 = OpConstantNull %v4uint + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_c378ee = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %res = OpVariable %_ptr_Function_v4uint Function %34 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Sample %30 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %int %arg_2 + %27 = OpImageFetch %v4uint %29 %30 Sample %31 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_c378ee +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_c378ee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_c378ee + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_c378ee OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_c378ee + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_c378ee OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl index fa004353c6..33e2b0689b 100644 --- a/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/c378ee.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_c378ee() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl index 16f8e3e499..67b4f75715 100644 --- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: u32) -> vec4 fn textureLoad_cad5f2() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl index b6f32e6fb4..c00b762b9c 100644 --- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_cad5f2() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl index b6f32e6fb4..c00b762b9c 100644 --- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_cad5f2() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl index 97b57afd29..e448cbd755 100644 --- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_cad5f2() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl index c06c0c6e69..732b1a9874 100644 --- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_cad5f2(texture2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm index d95ecf3ee2..43f5fa26f2 100644 --- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,51 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_cad5f2 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %35 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Sample %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4uint %30 %31 Sample %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_cad5f2 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_cad5f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_cad5f2 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_cad5f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_cad5f2 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_cad5f2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl index 5d3a52225b..05c278780a 100644 --- a/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/cad5f2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_cad5f2() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl index e34e2a9b7e..5aee221cc6 100644 --- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: u32, level: i32) -> f32 fn textureLoad_cb57c2() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl index 135cccf672..9ec09f6554 100644 --- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_cb57c2() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; float res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl index 135cccf672..9ec09f6554 100644 --- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_cb57c2() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; float res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl index 4a373bd502..e0f05506d1 100644 --- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_cb57c2() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; float res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3).x; diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl index 266af5bf70..c92ea659e3 100644 --- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_cb57c2(depth2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; int arg_3 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm index 5475379db9..83f4137672 100644 --- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,59 +41,60 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v3uint = OpTypeVector %uint 3 %_ptr_Function_float = OpTypePointer Function %float - %42 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_cb57c2 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_int Function %30 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2uint %arg_1 - %35 = OpCompositeExtract %uint %34 0 - %36 = OpCompositeExtract %uint %34 1 - %37 = OpLoad %uint %arg_2 - %38 = OpCompositeConstruct %v3uint %35 %36 %37 - %39 = OpLoad %int %arg_3 - %31 = OpImageFetch %v4float %32 %38 Lod %39 - %30 = OpCompositeExtract %float %31 0 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %38 = OpLoad %uint %arg_2 + %39 = OpCompositeConstruct %v3uint %36 %37 %38 + %40 = OpLoad %int %arg_3 + %32 = OpImageFetch %v4float %33 %39 Lod %40 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_cb57c2 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_cb57c2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_cb57c2 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_cb57c2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %54 = OpLabel - %55 = OpFunctionCall %void %textureLoad_cb57c2 + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_cb57c2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl index 6bedb93709..8c9f2ac4e6 100644 --- a/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/cb57c2.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_cb57c2() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl index 619901aad4..f53b198ca2 100644 --- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_3d, coords: vec3, level: u32) -> vec4 fn textureLoad_e35f72() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl index 0a1558fc48..9e661e2cec 100644 --- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_e35f72() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; int4 res = arg_0.Load(int4(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl index 0a1558fc48..9e661e2cec 100644 --- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture3D arg_0 : register(t0, space1); void textureLoad_e35f72() { - int3 arg_1 = (0).xxx; + int3 arg_1 = (1).xxx; uint arg_2 = 1u; int4 res = arg_0.Load(int4(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl index b1d0f09dd1..3a88a785d3 100644 --- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler3D arg_0_1; void textureLoad_e35f72() { - ivec3 arg_1 = ivec3(0); + ivec3 arg_1 = ivec3(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl index faa6c6b3f7..978bd255e5 100644 --- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_e35f72(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); + int3 arg_1 = int3(1); uint arg_2 = 1u; int4 res = tint_symbol_1.read(uint3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm index 64cc79d4ee..e6502f1a05 100644 --- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,50 +40,52 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_e35f72 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4int Function %35 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v3int %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4int %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v3int %arg_1 + %32 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4int %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_e35f72 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_e35f72 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_e35f72 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_e35f72 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_e35f72 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_e35f72 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl index bd4853beb5..b1df17ec3c 100644 --- a/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/e35f72.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_3d; fn textureLoad_e35f72() { - var arg_1 = vec3(); + var arg_1 = vec3(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl index a2b9f55a1d..8f380a4bed 100644 --- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_e3d2cc() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl index 2599303c42..0037606fa0 100644 --- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_e3d2cc() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl index 2599303c42..0037606fa0 100644 --- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_e3d2cc() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; int4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl index 6c70fb265b..584ca2acfe 100644 --- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2DMS arg_0_1; void textureLoad_e3d2cc() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; ivec4 res = texelFetch(arg_0_1, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl index 37f3ac3d45..9842b614b4 100644 --- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_e3d2cc(texture2d_ms tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.spvasm index 31837df0fb..8366280d06 100644 --- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,50 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %32 = OpConstantNull %v4int - %33 = OpTypeFunction %v4float + %33 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_e3d2cc = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %res = OpVariable %_ptr_Function_v4int Function %32 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %res = OpVariable %_ptr_Function_v4int Function %33 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %int %arg_2 - %25 = OpImageFetch %v4int %27 %28 Sample %29 - OpStore %res %25 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %int %arg_2 + %26 = OpImageFetch %v4int %28 %29 Sample %30 + OpStore %res %26 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_e3d2cc +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_e3d2cc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_e3d2cc + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_e3d2cc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_e3d2cc + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_e3d2cc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl index 6dd2d7de3d..27686e7297 100644 --- a/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/e3d2cc.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_e3d2cc() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl index 843e20c8b6..0a4c3ba8a5 100644 --- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_ebfb92() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl index 6f17474e81..03e13c8a10 100644 --- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_ebfb92() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(int3(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl index 6f17474e81..03e13c8a10 100644 --- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_ebfb92() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; uint4 res = arg_0.Load(int3(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl index 68072ab3f3..3530385884 100644 --- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2D arg_0_1; void textureLoad_ebfb92() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; uvec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl index 4cb0be7352..e527ee2dd7 100644 --- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_ebfb92(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm index 72acde0bd6..0329ceb6d0 100644 --- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,49 +41,51 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_ebfb92 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %35 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4uint %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_ebfb92 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_ebfb92 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_ebfb92 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_ebfb92 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_ebfb92 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_ebfb92 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl index e3bc181104..ba94b17803 100644 --- a/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/ebfb92.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_ebfb92() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl index 44ffa5bdfb..32c32e7b44 100644 --- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_f0abad() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl index 1ea969f748..5ba462ddd4 100644 --- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_f0abad() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl index 1ea969f748..5ba462ddd4 100644 --- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_f0abad() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl index 23f11069c6..292507027d 100644 --- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_f0abad() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; vec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl index caf35dd048..2e191f495e 100644 --- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f0abad(texture2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm index 1c884d09f2..1ef6220545 100644 --- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 46 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,48 +40,50 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %_ptr_Function_v4float = OpTypePointer Function %v4float - %32 = OpTypeFunction %v4float + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f0abad = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4float %27 %28 Sample %29 - OpStore %res %26 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4float %29 %30 Sample %31 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %32 - %34 = OpLabel - %35 = OpFunctionCall %void %textureLoad_f0abad +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureLoad_f0abad OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %37 = OpLabel - %38 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %38 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %void %textureLoad_f0abad + %43 = OpLabel + %44 = OpFunctionCall %void %textureLoad_f0abad OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_f0abad + %46 = OpLabel + %47 = OpFunctionCall %void %textureLoad_f0abad OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl index a5272f8a8e..208aa2d74e 100644 --- a/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/f0abad.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_f0abad() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl index b610d1f219..80914aa741 100644 --- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d_array, coords: vec2, array_index: u32, level: i32) -> vec4 fn textureLoad_f348d9() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl index dd04132893..9a460dd732 100644 --- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_f348d9() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl index dd04132893..9a460dd732 100644 --- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_f348d9() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; int arg_3 = 1; float4 res = arg_0.Load(uint4(uint3(arg_1, arg_2), uint(arg_3))); diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl index 35f6a4e80c..0cc57a5045 100644 --- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_f348d9() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; int arg_3 = 1; vec4 res = texelFetch(arg_0_1, ivec3(uvec3(arg_1, arg_2)), arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl index acd3776de3..9ea26fdfe0 100644 --- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f348d9(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; int arg_3 = 1; float4 res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm index 0ad6a0b6a2..7fa0aece37 100644 --- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,58 +41,59 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %29 = OpConstantNull %int + %30 = OpConstantNull %int %v3uint = OpTypeVector %uint 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %41 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f348d9 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_int Function %30 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 OpStore %arg_3 %int_1 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %36 = OpLoad %uint %arg_2 - %37 = OpCompositeConstruct %v3uint %34 %35 %36 - %38 = OpLoad %int %arg_3 - %30 = OpImageFetch %v4float %31 %37 Lod %38 - OpStore %res %30 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2uint %arg_1 + %35 = OpCompositeExtract %uint %34 0 + %36 = OpCompositeExtract %uint %34 1 + %37 = OpLoad %uint %arg_2 + %38 = OpCompositeConstruct %v3uint %35 %36 %37 + %39 = OpLoad %int %arg_3 + %31 = OpImageFetch %v4float %32 %38 Lod %39 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_f348d9 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_f348d9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %50 = OpLabel - %51 = OpFunctionCall %void %textureLoad_f348d9 + %51 = OpLabel + %52 = OpFunctionCall %void %textureLoad_f348d9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %53 = OpLabel - %54 = OpFunctionCall %void %textureLoad_f348d9 + %54 = OpLabel + %55 = OpFunctionCall %void %textureLoad_f348d9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl index f68ba27b13..4ed1b7e179 100644 --- a/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/f348d9.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d_array; fn textureLoad_f348d9() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; var arg_3 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl index 340da55e75..8e623c2cbb 100644 --- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_2d, coords: vec2, level: u32) -> vec4 fn textureLoad_f85291() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl index 534bddcfd5..98bcff14c5 100644 --- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_f85291() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int4 res = arg_0.Load(int3(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl index 534bddcfd5..98bcff14c5 100644 --- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2D arg_0 : register(t0, space1); void textureLoad_f85291() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; int4 res = arg_0.Load(int3(arg_1, int(arg_2))); } diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl index b0d8f40725..34c2e1c096 100644 --- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } @@ -42,7 +42,7 @@ void main() { uniform highp isampler2D arg_0_1; void textureLoad_f85291() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; ivec4 res = texelFetch(arg_0_1, arg_1, int(arg_2)); } diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl index 05a688c7b4..8bf531b3c4 100644 --- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_f85291(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; int4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm index f19cab1a52..29c7abd2cb 100644 --- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,50 +40,52 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 %_ptr_Function_v4int = OpTypePointer Function %v4int - %33 = OpConstantNull %v4int - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4int + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_f85291 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %res = OpVariable %_ptr_Function_v4int Function %33 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %res = OpVariable %_ptr_Function_v4int Function %35 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2int %arg_1 - %30 = OpLoad %uint %arg_2 - %26 = OpImageFetch %v4int %28 %29 Lod %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2int %arg_1 + %32 = OpLoad %uint %arg_2 + %28 = OpImageFetch %v4int %30 %31 Lod %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_f85291 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_f85291 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_f85291 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_f85291 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_f85291 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_f85291 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl index f06149d1bb..b5ea7cbc8b 100644 --- a/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/f85291.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_2d; fn textureLoad_f85291() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl index 84ebebb696..c0ae5e9428 100644 --- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_multisampled_2d, coords: vec2, sample_index: i32) -> f32 fn textureLoad_fcd23d() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl index 9095d2f4c0..307416e429 100644 --- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fcd23d() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl index 9095d2f4c0..307416e429 100644 --- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fcd23d() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; float res = arg_0.Load(uint3(arg_1, uint(0)), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl index a9d352bb73..7810099251 100644 --- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x; } @@ -25,7 +25,7 @@ precision mediump float; uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x; } @@ -42,7 +42,7 @@ void main() { uniform highp sampler2DMS arg_0_1; void textureLoad_fcd23d() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; float res = texelFetch(arg_0_1, ivec2(arg_1), arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl index 152e35d86d..e962910c6f 100644 --- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_fcd23d(depth2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; float res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.spvasm index 903c8a90da..5819297ffd 100644 --- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,49 +40,51 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %33 = OpTypeFunction %v4float + %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_fcd23d = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %int %arg_2 - %27 = OpImageFetch %v4float %28 %29 Sample %30 - %26 = OpCompositeExtract %float %27 0 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpLoad %int %arg_2 + %29 = OpImageFetch %v4float %30 %31 Sample %32 + %28 = OpCompositeExtract %float %29 0 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %33 - %35 = OpLabel - %36 = OpFunctionCall %void %textureLoad_fcd23d +%vertex_main_inner = OpFunction %v4float None %35 + %37 = OpLabel + %38 = OpFunctionCall %void %textureLoad_fcd23d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %38 = OpLabel - %39 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %39 + %40 = OpLabel + %41 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %41 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %42 = OpLabel - %43 = OpFunctionCall %void %textureLoad_fcd23d + %44 = OpLabel + %45 = OpFunctionCall %void %textureLoad_fcd23d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureLoad_fcd23d + %47 = OpLabel + %48 = OpFunctionCall %void %textureLoad_fcd23d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl index b784656b61..15aea5d9f1 100644 --- a/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/fcd23d.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d; fn textureLoad_fcd23d() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : f32 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl index 7d350fb38c..3d1718e466 100644 --- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_multisampled_2d, coords: vec2, sample_index: i32) -> vec4 fn textureLoad_fe0565() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res: vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl index b03e8a9cc2..4adfd92f32 100644 --- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fe0565() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl index b03e8a9cc2..4adfd92f32 100644 --- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DMS arg_0 : register(t0, space1); void textureLoad_fe0565() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; uint4 res = arg_0.Load(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl index ec7a715af3..dce2e13823 100644 --- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -25,7 +25,7 @@ precision mediump float; uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } @@ -42,7 +42,7 @@ void main() { uniform highp usampler2DMS arg_0_1; void textureLoad_fe0565() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; uvec4 res = texelFetch(arg_0_1, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl index f2e7ed760a..34cbab3ef0 100644 --- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_fe0565(texture2d_ms tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; uint4 res = tint_symbol_1.read(uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm index a3d2fba211..79c4e99310 100644 --- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,50 +40,52 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %33 = OpConstantNull %v4uint - %34 = OpTypeFunction %v4float + %35 = OpConstantNull %v4uint + %36 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_fe0565 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %res = OpVariable %_ptr_Function_v4uint Function %33 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %res = OpVariable %_ptr_Function_v4uint Function %35 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - %28 = OpLoad %11 %arg_0 - %29 = OpLoad %v2uint %arg_1 - %30 = OpLoad %int %arg_2 - %26 = OpImageFetch %v4uint %28 %29 Sample %30 - OpStore %res %26 + %30 = OpLoad %11 %arg_0 + %31 = OpLoad %v2uint %arg_1 + %32 = OpLoad %int %arg_2 + %28 = OpImageFetch %v4uint %30 %31 Sample %32 + OpStore %res %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %34 - %36 = OpLabel - %37 = OpFunctionCall %void %textureLoad_fe0565 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureLoad_fe0565 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %40 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %void %textureLoad_fe0565 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_fe0565 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %46 = OpLabel - %47 = OpFunctionCall %void %textureLoad_fe0565 + %48 = OpLabel + %49 = OpFunctionCall %void %textureLoad_fe0565 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl index 704e83870a..4b1098ad79 100644 --- a/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/fe0565.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_multisampled_2d; fn textureLoad_fe0565() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; var res : vec4 = textureLoad(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl index 2a9ad5e174..2fa7a824d7 100644 --- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl @@ -24,7 +24,7 @@ // fn textureLoad(texture: texture_depth_2d_array, coords: vec2, array_index: i32, level: u32) -> f32 fn textureLoad_ff1119() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res: f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl index 28a48c2a58..437984d891 100644 --- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.dxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_ff1119() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; float res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl index 28a48c2a58..437984d891 100644 --- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.fxc.hlsl @@ -1,7 +1,7 @@ Texture2DArray arg_0 : register(t0, space1); void textureLoad_ff1119() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; uint arg_3 = 1u; float res = arg_0.Load(int4(int3(arg_1, arg_2), int(arg_3))).x; diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl index f1df6bbf64..04f4330382 100644 --- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.glsl @@ -2,7 +2,7 @@ uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)).x; @@ -26,7 +26,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)).x; @@ -44,7 +44,7 @@ void main() { uniform highp sampler2DArray arg_0_1; void textureLoad_ff1119() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; uint arg_3 = 1u; float res = texelFetch(arg_0_1, ivec3(arg_1, arg_2), int(arg_3)).x; diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl index c7afcd6abf..e2c1dec69e 100644 --- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureLoad_ff1119(depth2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; uint arg_3 = 1u; float res = tint_symbol_1.read(uint2(arg_1), arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm index 15e9eee764..5dfa3c05fe 100644 --- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,59 +41,60 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %29 = OpConstantNull %uint + %30 = OpConstantNull %uint %v3int = OpTypeVector %int 3 %_ptr_Function_float = OpTypePointer Function %float - %42 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureLoad_ff1119 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_uint Function %30 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 OpStore %arg_3 %uint_1 - %32 = OpLoad %11 %arg_0 - %34 = OpLoad %v2int %arg_1 - %35 = OpCompositeExtract %int %34 0 - %36 = OpCompositeExtract %int %34 1 - %37 = OpLoad %int %arg_2 - %38 = OpCompositeConstruct %v3int %35 %36 %37 - %39 = OpLoad %uint %arg_3 - %31 = OpImageFetch %v4float %32 %38 Lod %39 - %30 = OpCompositeExtract %float %31 0 - OpStore %res %30 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %38 = OpLoad %int %arg_2 + %39 = OpCompositeConstruct %v3int %36 %37 %38 + %40 = OpLoad %uint %arg_3 + %32 = OpImageFetch %v4float %33 %39 Lod %40 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureLoad_ff1119 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureLoad_ff1119 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %51 = OpLabel - %52 = OpFunctionCall %void %textureLoad_ff1119 + %52 = OpLabel + %53 = OpFunctionCall %void %textureLoad_ff1119 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %54 = OpLabel - %55 = OpFunctionCall %void %textureLoad_ff1119 + %55 = OpLabel + %56 = OpFunctionCall %void %textureLoad_ff1119 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl index 5804382f03..57916d8d66 100644 --- a/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureLoad/ff1119.wgsl.expected.wgsl @@ -1,7 +1,7 @@ @group(1) @binding(0) var arg_0 : texture_depth_2d_array; fn textureLoad_ff1119() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; var arg_3 = 1u; var res : f32 = textureLoad(arg_0, arg_1, arg_2, arg_3); diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl index 73882bb839..e880138562 100644 --- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl +++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl @@ -25,8 +25,8 @@ // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> f32 fn textureSample_0dff6c() { - var arg_2 = vec2(); - const arg_3 = vec2(); + var arg_2 = vec2(1.f); + const arg_3 = vec2(1i); var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl index 4bd60c002c..f2b5b247d9 100644 --- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_0dff6c() { - float2 arg_2 = (0.0f).xx; - float res = arg_0.Sample(arg_1, arg_2, (0).xx).x; + float2 arg_2 = (1.0f).xx; + float res = arg_0.Sample(arg_1, arg_2, (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl index 4bd60c002c..f2b5b247d9 100644 --- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_0dff6c() { - float2 arg_2 = (0.0f).xx; - float res = arg_0.Sample(arg_1, arg_2, (0).xx).x; + float2 arg_2 = (1.0f).xx; + float res = arg_0.Sample(arg_1, arg_2, (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl index 29464a04c7..93f2ef0c0b 100644 --- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.glsl @@ -4,8 +4,8 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSample_0dff6c() { - vec2 arg_2 = vec2(0.0f); - float res = textureOffset(arg_0_arg_1, vec3(arg_2, 0.0f), ivec2(0)); + vec2 arg_2 = vec2(1.0f); + float res = textureOffset(arg_0_arg_1, vec3(arg_2, 0.0f), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl index b6fd4869d6..1d077b7cee 100644 --- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureSample_0dff6c(depth2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); - float res = tint_symbol.sample(tint_symbol_1, arg_2, int2(0)); + float2 arg_2 = float2(1.0f); + float res = tint_symbol.sample(tint_symbol_1, arg_2, int2(1)); } fragment void fragment_main(depth2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.spvasm index d548219a96..199b9ca421 100644 --- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 33 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,31 +27,34 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %v4float = OpTypeVector %float 4 - %21 = OpTypeSampledImage %3 + %23 = OpTypeSampledImage %3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %26 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %29 = OpConstantNull %float + %32 = OpConstantNull %float %textureSample_0dff6c = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %res = OpVariable %_ptr_Function_float Function %29 - OpStore %arg_2 %13 - %19 = OpLoad %7 %arg_1 - %20 = OpLoad %3 %arg_0 - %22 = OpSampledImage %21 %20 %19 - %23 = OpLoad %v2float %arg_2 - %17 = OpImageSampleImplicitLod %v4float %22 %23 ConstOffset %26 - %16 = OpCompositeExtract %float %17 0 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %res = OpVariable %_ptr_Function_float Function %32 + OpStore %arg_2 %14 + %21 = OpLoad %7 %arg_1 + %22 = OpLoad %3 %arg_0 + %24 = OpSampledImage %23 %22 %21 + %25 = OpLoad %v2float %arg_2 + %19 = OpImageSampleImplicitLod %v4float %24 %25 ConstOffset %29 + %18 = OpCompositeExtract %float %19 0 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %31 = OpLabel - %32 = OpFunctionCall %void %textureSample_0dff6c + %34 = OpLabel + %35 = OpFunctionCall %void %textureSample_0dff6c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl index 21bf36c6e3..d6184b77bf 100644 --- a/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/0dff6c.wgsl.expected.wgsl @@ -3,8 +3,8 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_0dff6c() { - var arg_2 = vec2(); - const arg_3 = vec2(); + var arg_2 = vec2(1.0f); + const arg_3 = vec2(1i); var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl index e42371f00d..ce00f1f53e 100644 --- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl +++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl @@ -25,9 +25,9 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> vec4 fn textureSample_17e988() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl index 87521f1266..c8a3fab1cb 100644 --- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_17e988() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl index 87521f1266..c8a3fab1cb 100644 --- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_17e988() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl index 95e45f8579..348c3eb528 100644 --- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.glsl @@ -4,9 +4,9 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_17e988() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl index 19433ebed8..f330dbb173 100644 --- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSample_17e988(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.spvasm index 4bb6bba355..774724c319 100644 --- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,41 +28,43 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int + %22 = OpConstantNull %int %v4float = OpTypeVector %float 4 - %25 = OpTypeSampledImage %3 + %27 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %38 = OpConstantNull %v4float + %40 = OpConstantNull %v4float %textureSample_17e988 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %res = OpVariable %_ptr_Function_v4float Function %38 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %res = OpVariable %_ptr_Function_v4float Function %40 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 - %23 = OpLoad %7 %arg_1 - %24 = OpLoad %3 %arg_0 - %26 = OpSampledImage %25 %24 %23 - %28 = OpLoad %v2float %arg_2 - %29 = OpCompositeExtract %float %28 0 - %30 = OpCompositeExtract %float %28 1 - %32 = OpLoad %int %arg_3 - %31 = OpConvertSToF %float %32 - %33 = OpCompositeConstruct %v3float %29 %30 %31 - %21 = OpImageSampleImplicitLod %v4float %26 %33 ConstOffset %35 - OpStore %res %21 + %25 = OpLoad %7 %arg_1 + %26 = OpLoad %3 %arg_0 + %28 = OpSampledImage %27 %26 %25 + %30 = OpLoad %v2float %arg_2 + %31 = OpCompositeExtract %float %30 0 + %32 = OpCompositeExtract %float %30 1 + %34 = OpLoad %int %arg_3 + %33 = OpConvertSToF %float %34 + %35 = OpCompositeConstruct %v3float %31 %32 %33 + %23 = OpImageSampleImplicitLod %v4float %28 %35 ConstOffset %37 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSample_17e988 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSample_17e988 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl index 586d22e23b..04cd29b789 100644 --- a/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/17e988.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_17e988() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl index 5531467287..d5cac4450a 100644 --- a/test/tint/builtins/gen/var/textureSample/193203.wgsl +++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl @@ -25,9 +25,9 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> vec4 fn textureSample_193203() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl index c60f2c0d78..14ba49d439 100644 --- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_193203() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl index c60f2c0d78..14ba49d439 100644 --- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_193203() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx); + float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl index 4c0e571428..683ab3b3ab 100644 --- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.glsl @@ -4,9 +4,9 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_193203() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0)); + vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl index ffe8266bb6..9754610ab8 100644 --- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSample_193203(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm index bfa4c0dd9b..aed414870d 100644 --- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,42 +28,45 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint + %22 = OpConstantNull %uint %v4float = OpTypeVector %float 4 - %25 = OpTypeSampledImage %3 + %27 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %36 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %39 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %39 = OpConstantNull %v4float + %42 = OpConstantNull %v4float %textureSample_193203 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %res = OpVariable %_ptr_Function_v4float Function %39 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %res = OpVariable %_ptr_Function_v4float Function %42 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 - %23 = OpLoad %7 %arg_1 - %24 = OpLoad %3 %arg_0 - %26 = OpSampledImage %25 %24 %23 - %28 = OpLoad %v2float %arg_2 - %29 = OpCompositeExtract %float %28 0 - %30 = OpCompositeExtract %float %28 1 - %32 = OpLoad %uint %arg_3 - %31 = OpConvertUToF %float %32 - %33 = OpCompositeConstruct %v3float %29 %30 %31 - %21 = OpImageSampleImplicitLod %v4float %26 %33 ConstOffset %36 - OpStore %res %21 + %25 = OpLoad %7 %arg_1 + %26 = OpLoad %3 %arg_0 + %28 = OpSampledImage %27 %26 %25 + %30 = OpLoad %v2float %arg_2 + %31 = OpCompositeExtract %float %30 0 + %32 = OpCompositeExtract %float %30 1 + %34 = OpLoad %uint %arg_3 + %33 = OpConvertUToF %float %34 + %35 = OpCompositeConstruct %v3float %31 %32 %33 + %23 = OpImageSampleImplicitLod %v4float %28 %35 ConstOffset %39 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSample_193203 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSample_193203 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl index 0060bd1a8e..1bb14d419a 100644 --- a/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/193203.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_193203() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl index b4f2ced4a9..5939c98a3b 100644 --- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl +++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> f32 fn textureSample_1a4e1b() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl index 8e8c108b4d..deee4f8de9 100644 --- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_1a4e1b() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl index 8e8c108b4d..deee4f8de9 100644 --- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_1a4e1b() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl index 732d16fecc..1c06d2c1f5 100644 --- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSample_1a4e1b() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f)); } diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl index f7bc43591d..7eed709ca7 100644 --- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_1a4e1b(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm index c89531b347..e71f0350b2 100644 --- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,40 +28,42 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint + %22 = OpConstantNull %uint %v4float = OpTypeVector %float 4 - %26 = OpTypeSampledImage %3 + %28 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %_ptr_Function_float = OpTypePointer Function %float - %37 = OpConstantNull %float + %39 = OpConstantNull %float %textureSample_1a4e1b = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %res = OpVariable %_ptr_Function_float Function %37 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %res = OpVariable %_ptr_Function_float Function %39 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 - %24 = OpLoad %7 %arg_1 - %25 = OpLoad %3 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %29 = OpLoad %v2float %arg_2 - %30 = OpCompositeExtract %float %29 0 - %31 = OpCompositeExtract %float %29 1 - %33 = OpLoad %uint %arg_3 - %32 = OpConvertUToF %float %33 - %34 = OpCompositeConstruct %v3float %30 %31 %32 - %22 = OpImageSampleImplicitLod %v4float %27 %34 - %21 = OpCompositeExtract %float %22 0 - OpStore %res %21 + %26 = OpLoad %7 %arg_1 + %27 = OpLoad %3 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %31 = OpLoad %v2float %arg_2 + %32 = OpCompositeExtract %float %31 0 + %33 = OpCompositeExtract %float %31 1 + %35 = OpLoad %uint %arg_3 + %34 = OpConvertUToF %float %35 + %36 = OpCompositeConstruct %v3float %32 %33 %34 + %24 = OpImageSampleImplicitLod %v4float %29 %36 + %23 = OpCompositeExtract %float %24 0 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSample_1a4e1b + %41 = OpLabel + %42 = OpFunctionCall %void %textureSample_1a4e1b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl index 3b49da816f..58721bd546 100644 --- a/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/1a4e1b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_1a4e1b() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl index b575fbac84..2f44331c3c 100644 --- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl +++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl @@ -25,8 +25,8 @@ // fn textureSample(texture: texture_3d, sampler: sampler, coords: vec3, @const offset: vec3) -> vec4 fn textureSample_2149ec() { - var arg_2 = vec3(); - const arg_3 = vec3(); + var arg_2 = vec3(1.f); + const arg_3 = vec3(1i); var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl index 1528b90d0a..851fcb9f7b 100644 --- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_2149ec() { - float3 arg_2 = (0.0f).xxx; - float4 res = arg_0.Sample(arg_1, arg_2, (0).xxx); + float3 arg_2 = (1.0f).xxx; + float4 res = arg_0.Sample(arg_1, arg_2, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl index 1528b90d0a..851fcb9f7b 100644 --- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_2149ec() { - float3 arg_2 = (0.0f).xxx; - float4 res = arg_0.Sample(arg_1, arg_2, (0).xxx); + float3 arg_2 = (1.0f).xxx; + float4 res = arg_0.Sample(arg_1, arg_2, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl index 67fde956fb..1f2238c86e 100644 --- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.glsl @@ -4,8 +4,8 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSample_2149ec() { - vec3 arg_2 = vec3(0.0f); - vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(0)); + vec3 arg_2 = vec3(1.0f); + vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl index 96ab51e48c..d41fa5af31 100644 --- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureSample_2149ec(texture3d tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, int3(0)); + float3 arg_2 = float3(1.0f); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, int3(1)); } fragment void fragment_main(texture3d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.spvasm index 8e435b94be..2882225b55 100644 --- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,30 +27,33 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %v4float = OpTypeVector %float 4 - %20 = OpTypeSampledImage %3 + %22 = OpTypeSampledImage %3 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %25 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %28 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpConstantNull %v4float + %31 = OpConstantNull %v4float %textureSample_2149ec = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %res = OpVariable %_ptr_Function_v4float Function %28 - OpStore %arg_2 %13 - %18 = OpLoad %7 %arg_1 - %19 = OpLoad %3 %arg_0 - %21 = OpSampledImage %20 %19 %18 - %22 = OpLoad %v3float %arg_2 - %16 = OpImageSampleImplicitLod %v4float %21 %22 ConstOffset %25 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %res = OpVariable %_ptr_Function_v4float Function %31 + OpStore %arg_2 %14 + %20 = OpLoad %7 %arg_1 + %21 = OpLoad %3 %arg_0 + %23 = OpSampledImage %22 %21 %20 + %24 = OpLoad %v3float %arg_2 + %18 = OpImageSampleImplicitLod %v4float %23 %24 ConstOffset %28 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSample_2149ec + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_2149ec OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl index 2d7485d857..4504ed8764 100644 --- a/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/2149ec.wgsl.expected.wgsl @@ -3,8 +3,8 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_2149ec() { - var arg_2 = vec3(); - const arg_3 = vec3(); + var arg_2 = vec3(1.0f); + const arg_3 = vec3(1i); var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl index 201d5e4c16..2a517658fe 100644 --- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl +++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d, sampler: sampler, coords: vec2) -> f32 fn textureSample_38bbb9() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var res: f32 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl index ffedf8fcf9..02dfbcd951 100644 --- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_38bbb9() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float res = arg_0.Sample(arg_1, arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl index ffedf8fcf9..02dfbcd951 100644 --- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_38bbb9() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float res = arg_0.Sample(arg_1, arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl index 31f10fa0b5..4fe5c890d9 100644 --- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSample_38bbb9() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float res = texture(arg_0_arg_1, vec3(arg_2, 0.0f)); } diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.msl index 6482503766..332cc17956 100644 --- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_38bbb9(depth2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float res = tint_symbol.sample(tint_symbol_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.spvasm index 05511e90da..67ed449334 100644 --- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,28 +27,30 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %v4float = OpTypeVector %float 4 - %21 = OpTypeSampledImage %3 + %23 = OpTypeSampledImage %3 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %28 = OpConstantNull %float %textureSample_38bbb9 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %res = OpVariable %_ptr_Function_float Function %26 - OpStore %arg_2 %13 - %19 = OpLoad %7 %arg_1 - %20 = OpLoad %3 %arg_0 - %22 = OpSampledImage %21 %20 %19 - %23 = OpLoad %v2float %arg_2 - %17 = OpImageSampleImplicitLod %v4float %22 %23 - %16 = OpCompositeExtract %float %17 0 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %res = OpVariable %_ptr_Function_float Function %28 + OpStore %arg_2 %14 + %21 = OpLoad %7 %arg_1 + %22 = OpLoad %3 %arg_0 + %24 = OpSampledImage %23 %22 %21 + %25 = OpLoad %v2float %arg_2 + %19 = OpImageSampleImplicitLod %v4float %24 %25 + %18 = OpCompositeExtract %float %19 0 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_38bbb9 + %30 = OpLabel + %31 = OpFunctionCall %void %textureSample_38bbb9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl index 2d6c9d10d3..9bad3e41ba 100644 --- a/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/38bbb9.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_38bbb9() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var res : f32 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl index c833f38936..07d3d57483 100644 --- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl +++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_3d, sampler: sampler, coords: vec3) -> vec4 fn textureSample_3b50bd() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var res: vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl index 29a54eaca8..5eb33e5d64 100644 --- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_3b50bd() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float4 res = arg_0.Sample(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl index 29a54eaca8..5eb33e5d64 100644 --- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_3b50bd() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float4 res = arg_0.Sample(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl index 1f936b41ae..5dedecf00a 100644 --- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSample_3b50bd() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); vec4 res = texture(arg_0_arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.msl index 0bf2684644..85f1579359 100644 --- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_3b50bd(texture3d tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float4 res = tint_symbol.sample(tint_symbol_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.spvasm index 2539dd1b7b..205ec4bbcc 100644 --- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,27 +27,29 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %v4float = OpTypeVector %float 4 - %20 = OpTypeSampledImage %3 + %22 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSample_3b50bd = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %res = OpVariable %_ptr_Function_v4float Function %25 - OpStore %arg_2 %13 - %18 = OpLoad %7 %arg_1 - %19 = OpLoad %3 %arg_0 - %21 = OpSampledImage %20 %19 %18 - %22 = OpLoad %v3float %arg_2 - %16 = OpImageSampleImplicitLod %v4float %21 %22 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %res = OpVariable %_ptr_Function_v4float Function %27 + OpStore %arg_2 %14 + %20 = OpLoad %7 %arg_1 + %21 = OpLoad %3 %arg_0 + %23 = OpSampledImage %22 %21 %20 + %24 = OpLoad %v3float %arg_2 + %18 = OpImageSampleImplicitLod %v4float %23 %24 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_3b50bd + %29 = OpLabel + %30 = OpFunctionCall %void %textureSample_3b50bd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl index 77b2588d34..e58076bbcd 100644 --- a/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/3b50bd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_3b50bd() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var res : vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl index 96ff918d58..bd4f57cf7d 100644 --- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl +++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl @@ -25,9 +25,9 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, @const offset: vec2) -> f32 fn textureSample_4703d0() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl index 3761e5ad78..0a168dbd66 100644 --- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4703d0() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl index 3761e5ad78..0a168dbd66 100644 --- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4703d0() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl index 77d89497cb..313f70adaa 100644 --- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSample_4703d0(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; - float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0)); + float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm index ed2182b8e4..f42d049a72 100644 --- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,43 +28,46 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint + %22 = OpConstantNull %uint %v4float = OpTypeVector %float 4 - %26 = OpTypeSampledImage %3 + %28 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %37 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %40 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %40 = OpConstantNull %float + %43 = OpConstantNull %float %textureSample_4703d0 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %res = OpVariable %_ptr_Function_float Function %40 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %res = OpVariable %_ptr_Function_float Function %43 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 - %24 = OpLoad %7 %arg_1 - %25 = OpLoad %3 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %29 = OpLoad %v2float %arg_2 - %30 = OpCompositeExtract %float %29 0 - %31 = OpCompositeExtract %float %29 1 - %33 = OpLoad %uint %arg_3 - %32 = OpConvertUToF %float %33 - %34 = OpCompositeConstruct %v3float %30 %31 %32 - %22 = OpImageSampleImplicitLod %v4float %27 %34 ConstOffset %37 - %21 = OpCompositeExtract %float %22 0 - OpStore %res %21 + %26 = OpLoad %7 %arg_1 + %27 = OpLoad %3 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %31 = OpLoad %v2float %arg_2 + %32 = OpCompositeExtract %float %31 0 + %33 = OpCompositeExtract %float %31 1 + %35 = OpLoad %uint %arg_3 + %34 = OpConvertUToF %float %35 + %36 = OpCompositeConstruct %v3float %32 %33 %34 + %24 = OpImageSampleImplicitLod %v4float %29 %36 ConstOffset %40 + %23 = OpCompositeExtract %float %24 0 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSample_4703d0 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSample_4703d0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl index 00781e5565..946bf086fa 100644 --- a/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/4703d0.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_4703d0() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl index 6f30c35acd..fbdf2216ef 100644 --- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl +++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> vec4 fn textureSample_4dd1bf() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl index c779be1509..5e80f0b505 100644 --- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4dd1bf() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl index c779be1509..5e80f0b505 100644 --- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_4dd1bf() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.msl index 89cfd572c0..a643911608 100644 --- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_4dd1bf(texturecube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm index 131c440b7a..16d357edf6 100644 --- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -29,39 +29,41 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int + %22 = OpConstantNull %int %v4float = OpTypeVector %float 4 - %25 = OpTypeSampledImage %3 + %27 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpConstantNull %v4float + %38 = OpConstantNull %v4float %textureSample_4dd1bf = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %res = OpVariable %_ptr_Function_v4float Function %36 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %res = OpVariable %_ptr_Function_v4float Function %38 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 - %23 = OpLoad %7 %arg_1 - %24 = OpLoad %3 %arg_0 - %26 = OpSampledImage %25 %24 %23 - %27 = OpLoad %v3float %arg_2 - %28 = OpCompositeExtract %float %27 0 - %29 = OpCompositeExtract %float %27 1 - %30 = OpCompositeExtract %float %27 2 - %32 = OpLoad %int %arg_3 - %31 = OpConvertSToF %float %32 - %33 = OpCompositeConstruct %v4float %28 %29 %30 %31 - %21 = OpImageSampleImplicitLod %v4float %26 %33 - OpStore %res %21 + %25 = OpLoad %7 %arg_1 + %26 = OpLoad %3 %arg_0 + %28 = OpSampledImage %27 %26 %25 + %29 = OpLoad %v3float %arg_2 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpCompositeExtract %float %29 2 + %34 = OpLoad %int %arg_3 + %33 = OpConvertSToF %float %34 + %35 = OpCompositeConstruct %v4float %30 %31 %32 %33 + %23 = OpImageSampleImplicitLod %v4float %28 %35 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSample_4dd1bf + %40 = OpLabel + %41 = OpFunctionCall %void %textureSample_4dd1bf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl index f20de37831..c81daf1199 100644 --- a/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/4dd1bf.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_4dd1bf() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl index 9d0ec56b2a..1e81aff4c0 100644 --- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl +++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureSample_51b514() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var res: vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl index 32dce227fd..05b317f326 100644 --- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_51b514() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = arg_0.Sample(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl index 32dce227fd..05b317f326 100644 --- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_51b514() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = arg_0.Sample(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl index ab891bc901..8728e28374 100644 --- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSample_51b514() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = texture(arg_0_arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.msl index bffded98a9..c988d80c6f 100644 --- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_51b514(texture2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float4 res = tint_symbol.sample(tint_symbol_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.spvasm index fe14ef4fd0..63296a45bc 100644 --- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,27 +27,29 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %v4float = OpTypeVector %float 4 - %20 = OpTypeSampledImage %3 + %22 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSample_51b514 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %res = OpVariable %_ptr_Function_v4float Function %25 - OpStore %arg_2 %13 - %18 = OpLoad %7 %arg_1 - %19 = OpLoad %3 %arg_0 - %21 = OpSampledImage %20 %19 %18 - %22 = OpLoad %v2float %arg_2 - %16 = OpImageSampleImplicitLod %v4float %21 %22 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %res = OpVariable %_ptr_Function_v4float Function %27 + OpStore %arg_2 %14 + %20 = OpLoad %7 %arg_1 + %21 = OpLoad %3 %arg_0 + %23 = OpSampledImage %22 %21 %20 + %24 = OpLoad %v2float %arg_2 + %18 = OpImageSampleImplicitLod %v4float %23 %24 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_51b514 + %29 = OpLabel + %30 = OpFunctionCall %void %textureSample_51b514 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl index 23f0f360a1..14161ec924 100644 --- a/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/51b514.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_51b514() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var res : vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl index 1f61dc8463..82d3e6f5a0 100644 --- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl +++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl @@ -25,9 +25,9 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, @const offset: vec2) -> f32 fn textureSample_60bf45() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl index 6a9339e032..4d12d1b4a8 100644 --- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_60bf45() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl index 6a9339e032..4d12d1b4a8 100644 --- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_60bf45() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (0).xx).x; + float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3)), (1).xx).x; } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl index b822a47af9..e2a533c217 100644 --- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSample_60bf45(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; - float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(0)); + float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.spvasm index efd63d2aec..30716a207a 100644 --- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,42 +28,44 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int + %22 = OpConstantNull %int %v4float = OpTypeVector %float 4 - %26 = OpTypeSampledImage %3 + %28 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %36 = OpConstantNull %v2int + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %39 = OpConstantNull %float + %41 = OpConstantNull %float %textureSample_60bf45 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %res = OpVariable %_ptr_Function_float Function %39 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %res = OpVariable %_ptr_Function_float Function %41 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 - %24 = OpLoad %7 %arg_1 - %25 = OpLoad %3 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %29 = OpLoad %v2float %arg_2 - %30 = OpCompositeExtract %float %29 0 - %31 = OpCompositeExtract %float %29 1 - %33 = OpLoad %int %arg_3 - %32 = OpConvertSToF %float %33 - %34 = OpCompositeConstruct %v3float %30 %31 %32 - %22 = OpImageSampleImplicitLod %v4float %27 %34 ConstOffset %36 - %21 = OpCompositeExtract %float %22 0 - OpStore %res %21 + %26 = OpLoad %7 %arg_1 + %27 = OpLoad %3 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %31 = OpLoad %v2float %arg_2 + %32 = OpCompositeExtract %float %31 0 + %33 = OpCompositeExtract %float %31 1 + %35 = OpLoad %int %arg_3 + %34 = OpConvertSToF %float %35 + %36 = OpCompositeConstruct %v3float %32 %33 %34 + %24 = OpImageSampleImplicitLod %v4float %29 %36 ConstOffset %38 + %23 = OpCompositeExtract %float %24 0 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSample_60bf45 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSample_60bf45 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl index dfcc39c298..20e38db88e 100644 --- a/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/60bf45.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_60bf45() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl index 202aa337f9..d2bbdce893 100644 --- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl +++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> vec4 fn textureSample_6717ca() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl index 01c97bce1e..17ca05ce06 100644 --- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_6717ca() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl index 01c97bce1e..17ca05ce06 100644 --- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_6717ca() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl index d8cdc14fcb..785b0c8a3f 100644 --- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_6717ca() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.msl index e512ecabd3..970129e050 100644 --- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_6717ca(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm index 8fd8ccf870..66cc8f424e 100644 --- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,39 +28,41 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int + %22 = OpConstantNull %int %v4float = OpTypeVector %float 4 - %25 = OpTypeSampledImage %3 + %27 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpConstantNull %v4float + %38 = OpConstantNull %v4float %textureSample_6717ca = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %res = OpVariable %_ptr_Function_v4float Function %36 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %res = OpVariable %_ptr_Function_v4float Function %38 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 - %23 = OpLoad %7 %arg_1 - %24 = OpLoad %3 %arg_0 - %26 = OpSampledImage %25 %24 %23 - %28 = OpLoad %v2float %arg_2 - %29 = OpCompositeExtract %float %28 0 - %30 = OpCompositeExtract %float %28 1 - %32 = OpLoad %int %arg_3 - %31 = OpConvertSToF %float %32 - %33 = OpCompositeConstruct %v3float %29 %30 %31 - %21 = OpImageSampleImplicitLod %v4float %26 %33 - OpStore %res %21 + %25 = OpLoad %7 %arg_1 + %26 = OpLoad %3 %arg_0 + %28 = OpSampledImage %27 %26 %25 + %30 = OpLoad %v2float %arg_2 + %31 = OpCompositeExtract %float %30 0 + %32 = OpCompositeExtract %float %30 1 + %34 = OpLoad %int %arg_3 + %33 = OpConvertSToF %float %34 + %35 = OpCompositeConstruct %v3float %31 %32 %33 + %23 = OpImageSampleImplicitLod %v4float %28 %35 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSample_6717ca + %40 = OpLabel + %41 = OpFunctionCall %void %textureSample_6717ca OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl index 037b29baa1..44579f3a74 100644 --- a/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/6717ca.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_6717ca() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl index 1b24313a43..066a4c0288 100644 --- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl +++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32) -> f32 fn textureSample_7e9ffd() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl index 88b7a82131..5b1a5d9ed8 100644 --- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7e9ffd() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl index 88b7a82131..5b1a5d9ed8 100644 --- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7e9ffd() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl index 1f79b36b87..fd4c016c85 100644 --- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSample_7e9ffd() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), 0.0f)); } diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.msl index 9a296765b6..24cda54886 100644 --- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_7e9ffd(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm index 76ef866554..ecc54a04cd 100644 --- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,40 +28,42 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int + %22 = OpConstantNull %int %v4float = OpTypeVector %float 4 - %26 = OpTypeSampledImage %3 + %28 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %_ptr_Function_float = OpTypePointer Function %float - %37 = OpConstantNull %float + %39 = OpConstantNull %float %textureSample_7e9ffd = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %res = OpVariable %_ptr_Function_float Function %37 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %res = OpVariable %_ptr_Function_float Function %39 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 - %24 = OpLoad %7 %arg_1 - %25 = OpLoad %3 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %29 = OpLoad %v2float %arg_2 - %30 = OpCompositeExtract %float %29 0 - %31 = OpCompositeExtract %float %29 1 - %33 = OpLoad %int %arg_3 - %32 = OpConvertSToF %float %33 - %34 = OpCompositeConstruct %v3float %30 %31 %32 - %22 = OpImageSampleImplicitLod %v4float %27 %34 - %21 = OpCompositeExtract %float %22 0 - OpStore %res %21 + %26 = OpLoad %7 %arg_1 + %27 = OpLoad %3 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %31 = OpLoad %v2float %arg_2 + %32 = OpCompositeExtract %float %31 0 + %33 = OpCompositeExtract %float %31 1 + %35 = OpLoad %int %arg_3 + %34 = OpConvertSToF %float %35 + %36 = OpCompositeConstruct %v3float %32 %33 %34 + %24 = OpImageSampleImplicitLod %v4float %29 %36 + %23 = OpCompositeExtract %float %24 0 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSample_7e9ffd + %41 = OpLabel + %42 = OpFunctionCall %void %textureSample_7e9ffd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl index 541e9b95e9..1b7dc856b9 100644 --- a/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/7e9ffd.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_7e9ffd() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl index a31832c582..1ca06645c4 100644 --- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl +++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> f32 fn textureSample_7fd8cb() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl index ddbeb1a297..8543883b06 100644 --- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7fd8cb() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl index ddbeb1a297..8543883b06 100644 --- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_7fd8cb() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl index 80016e7c51..ef8093126c 100644 --- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_7fd8cb(depthcube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm index 962925e8e5..8bba39b488 100644 --- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -29,40 +29,42 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint + %22 = OpConstantNull %uint %v4float = OpTypeVector %float 4 - %26 = OpTypeSampledImage %3 + %28 = OpTypeSampledImage %3 %_ptr_Function_float = OpTypePointer Function %float - %37 = OpConstantNull %float + %39 = OpConstantNull %float %textureSample_7fd8cb = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %res = OpVariable %_ptr_Function_float Function %37 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %res = OpVariable %_ptr_Function_float Function %39 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 - %24 = OpLoad %7 %arg_1 - %25 = OpLoad %3 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v3float %arg_2 - %29 = OpCompositeExtract %float %28 0 - %30 = OpCompositeExtract %float %28 1 - %31 = OpCompositeExtract %float %28 2 - %33 = OpLoad %uint %arg_3 - %32 = OpConvertUToF %float %33 - %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 - %22 = OpImageSampleImplicitLod %v4float %27 %34 - %21 = OpCompositeExtract %float %22 0 - OpStore %res %21 + %26 = OpLoad %7 %arg_1 + %27 = OpLoad %3 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v3float %arg_2 + %31 = OpCompositeExtract %float %30 0 + %32 = OpCompositeExtract %float %30 1 + %33 = OpCompositeExtract %float %30 2 + %35 = OpLoad %uint %arg_3 + %34 = OpConvertUToF %float %35 + %36 = OpCompositeConstruct %v4float %31 %32 %33 %34 + %24 = OpImageSampleImplicitLod %v4float %29 %36 + %23 = OpCompositeExtract %float %24 0 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSample_7fd8cb + %41 = OpLabel + %42 = OpFunctionCall %void %textureSample_7fd8cb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl index 6ed7b4c56b..6b4cfa7620 100644 --- a/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/7fd8cb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_7fd8cb() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl index a60754cb6c..2c3b8c8a52 100644 --- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl +++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl @@ -25,8 +25,8 @@ // fn textureSample(texture: texture_2d, sampler: sampler, coords: vec2, @const offset: vec2) -> vec4 fn textureSample_85c4ba() { - var arg_2 = vec2(); - const arg_3 = vec2(); + var arg_2 = vec2(1.f); + const arg_3 = vec2(1i); var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl index d96272b6b2..582b2c508c 100644 --- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.dxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_85c4ba() { - float2 arg_2 = (0.0f).xx; - float4 res = arg_0.Sample(arg_1, arg_2, (0).xx); + float2 arg_2 = (1.0f).xx; + float4 res = arg_0.Sample(arg_1, arg_2, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl index d96272b6b2..582b2c508c 100644 --- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.fxc.hlsl @@ -2,8 +2,8 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_85c4ba() { - float2 arg_2 = (0.0f).xx; - float4 res = arg_0.Sample(arg_1, arg_2, (0).xx); + float2 arg_2 = (1.0f).xx; + float4 res = arg_0.Sample(arg_1, arg_2, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl index 7ec1594d48..fee2b62186 100644 --- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.glsl @@ -4,8 +4,8 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSample_85c4ba() { - vec2 arg_2 = vec2(0.0f); - vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(0)); + vec2 arg_2 = vec2(1.0f); + vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl index 16f9ef677f..1bf5459fd0 100644 --- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureSample_85c4ba(texture2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, int2(0)); + float2 arg_2 = float2(1.0f); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, int2(1)); } fragment void fragment_main(texture2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.spvasm index 96546ebf61..320dfc48e0 100644 --- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,30 +27,33 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %v4float = OpTypeVector %float 4 - %20 = OpTypeSampledImage %3 + %22 = OpTypeSampledImage %3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %25 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %28 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %28 = OpConstantNull %v4float + %31 = OpConstantNull %v4float %textureSample_85c4ba = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %res = OpVariable %_ptr_Function_v4float Function %28 - OpStore %arg_2 %13 - %18 = OpLoad %7 %arg_1 - %19 = OpLoad %3 %arg_0 - %21 = OpSampledImage %20 %19 %18 - %22 = OpLoad %v2float %arg_2 - %16 = OpImageSampleImplicitLod %v4float %21 %22 ConstOffset %25 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %res = OpVariable %_ptr_Function_v4float Function %31 + OpStore %arg_2 %14 + %20 = OpLoad %7 %arg_1 + %21 = OpLoad %3 %arg_0 + %23 = OpSampledImage %22 %21 %20 + %24 = OpLoad %v2float %arg_2 + %18 = OpImageSampleImplicitLod %v4float %23 %24 ConstOffset %28 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %30 = OpLabel - %31 = OpFunctionCall %void %textureSample_85c4ba + %33 = OpLabel + %34 = OpFunctionCall %void %textureSample_85c4ba OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl index 8f1a0af755..209f2698a8 100644 --- a/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/85c4ba.wgsl.expected.wgsl @@ -3,8 +3,8 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_85c4ba() { - var arg_2 = vec2(); - const arg_3 = vec2(); + var arg_2 = vec2(1.0f); + const arg_3 = vec2(1i); var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl index 6f0116e94a..f47d67e100 100644 --- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl +++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32) -> vec4 fn textureSample_bc7477() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl index 5ef25be8f8..de700b8db1 100644 --- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_bc7477() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl index 5ef25be8f8..de700b8db1 100644 --- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_bc7477() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float4 res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl index 8b3614ef03..c45ece00dc 100644 --- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_bc7477(texturecube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm index 4a09842772..6732a662f0 100644 --- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -29,39 +29,41 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint + %22 = OpConstantNull %uint %v4float = OpTypeVector %float 4 - %25 = OpTypeSampledImage %3 + %27 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpConstantNull %v4float + %38 = OpConstantNull %v4float %textureSample_bc7477 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %res = OpVariable %_ptr_Function_v4float Function %36 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %res = OpVariable %_ptr_Function_v4float Function %38 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 - %23 = OpLoad %7 %arg_1 - %24 = OpLoad %3 %arg_0 - %26 = OpSampledImage %25 %24 %23 - %27 = OpLoad %v3float %arg_2 - %28 = OpCompositeExtract %float %27 0 - %29 = OpCompositeExtract %float %27 1 - %30 = OpCompositeExtract %float %27 2 - %32 = OpLoad %uint %arg_3 - %31 = OpConvertUToF %float %32 - %33 = OpCompositeConstruct %v4float %28 %29 %30 %31 - %21 = OpImageSampleImplicitLod %v4float %26 %33 - OpStore %res %21 + %25 = OpLoad %7 %arg_1 + %26 = OpLoad %3 %arg_0 + %28 = OpSampledImage %27 %26 %25 + %29 = OpLoad %v3float %arg_2 + %30 = OpCompositeExtract %float %29 0 + %31 = OpCompositeExtract %float %29 1 + %32 = OpCompositeExtract %float %29 2 + %34 = OpLoad %uint %arg_3 + %33 = OpConvertUToF %float %34 + %35 = OpCompositeConstruct %v4float %30 %31 %32 %33 + %23 = OpImageSampleImplicitLod %v4float %28 %35 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSample_bc7477 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSample_bc7477 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl index 48a05aeadb..159fd693d3 100644 --- a/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/bc7477.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_bc7477() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl index 03182518b6..3937cec5bb 100644 --- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl +++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32) -> f32 fn textureSample_c2f4e8() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var res: f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl index 209b7d33cf..be2d46c371 100644 --- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_c2f4e8() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl index 209b7d33cf..be2d46c371 100644 --- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_c2f4e8() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float res = arg_0.Sample(arg_1, float4(arg_2, float(arg_3))).x; } diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.msl index 0a8ee57c20..5a7efc444a 100644 --- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_c2f4e8(depthcube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm index 357c5ffeed..2e9a4e2b04 100644 --- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 43 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -29,40 +29,42 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int + %22 = OpConstantNull %int %v4float = OpTypeVector %float 4 - %26 = OpTypeSampledImage %3 + %28 = OpTypeSampledImage %3 %_ptr_Function_float = OpTypePointer Function %float - %37 = OpConstantNull %float + %39 = OpConstantNull %float %textureSample_c2f4e8 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %res = OpVariable %_ptr_Function_float Function %37 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %res = OpVariable %_ptr_Function_float Function %39 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 - %24 = OpLoad %7 %arg_1 - %25 = OpLoad %3 %arg_0 - %27 = OpSampledImage %26 %25 %24 - %28 = OpLoad %v3float %arg_2 - %29 = OpCompositeExtract %float %28 0 - %30 = OpCompositeExtract %float %28 1 - %31 = OpCompositeExtract %float %28 2 - %33 = OpLoad %int %arg_3 - %32 = OpConvertSToF %float %33 - %34 = OpCompositeConstruct %v4float %29 %30 %31 %32 - %22 = OpImageSampleImplicitLod %v4float %27 %34 - %21 = OpCompositeExtract %float %22 0 - OpStore %res %21 + %26 = OpLoad %7 %arg_1 + %27 = OpLoad %3 %arg_0 + %29 = OpSampledImage %28 %27 %26 + %30 = OpLoad %v3float %arg_2 + %31 = OpCompositeExtract %float %30 0 + %32 = OpCompositeExtract %float %30 1 + %33 = OpCompositeExtract %float %30 2 + %35 = OpLoad %int %arg_3 + %34 = OpConvertSToF %float %35 + %36 = OpCompositeConstruct %v4float %31 %32 %33 %34 + %24 = OpImageSampleImplicitLod %v4float %29 %36 + %23 = OpCompositeExtract %float %24 0 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %39 = OpLabel - %40 = OpFunctionCall %void %textureSample_c2f4e8 + %41 = OpLabel + %42 = OpFunctionCall %void %textureSample_c2f4e8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl index f6b719294d..b5c02ef10c 100644 --- a/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/c2f4e8.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_c2f4e8() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var res : f32 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl index 653e5a4222..0a4bb40154 100644 --- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl +++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32) -> vec4 fn textureSample_d6b281() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var res: vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl index 40fc858335..00a1d0af51 100644 --- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_d6b281() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl index 40fc858335..00a1d0af51 100644 --- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_d6b281() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float4 res = arg_0.Sample(arg_1, float3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl index bab02f6d4f..309e1800bf 100644 --- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSample_d6b281() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3))); } diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl index cac32264e8..2d0626fb7b 100644 --- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_d6b281(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm index df39671077..c74ef88dd0 100644 --- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 40 +; Bound: 42 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,39 +28,41 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint + %22 = OpConstantNull %uint %v4float = OpTypeVector %float 4 - %25 = OpTypeSampledImage %3 + %27 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %36 = OpConstantNull %v4float + %38 = OpConstantNull %v4float %textureSample_d6b281 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %res = OpVariable %_ptr_Function_v4float Function %36 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %res = OpVariable %_ptr_Function_v4float Function %38 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 - %23 = OpLoad %7 %arg_1 - %24 = OpLoad %3 %arg_0 - %26 = OpSampledImage %25 %24 %23 - %28 = OpLoad %v2float %arg_2 - %29 = OpCompositeExtract %float %28 0 - %30 = OpCompositeExtract %float %28 1 - %32 = OpLoad %uint %arg_3 - %31 = OpConvertUToF %float %32 - %33 = OpCompositeConstruct %v3float %29 %30 %31 - %21 = OpImageSampleImplicitLod %v4float %26 %33 - OpStore %res %21 + %25 = OpLoad %7 %arg_1 + %26 = OpLoad %3 %arg_0 + %28 = OpSampledImage %27 %26 %25 + %30 = OpLoad %v2float %arg_2 + %31 = OpCompositeExtract %float %30 0 + %32 = OpCompositeExtract %float %30 1 + %34 = OpLoad %uint %arg_3 + %33 = OpConvertUToF %float %34 + %35 = OpCompositeConstruct %v3float %31 %32 %33 + %23 = OpImageSampleImplicitLod %v4float %28 %35 + OpStore %res %23 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %38 = OpLabel - %39 = OpFunctionCall %void %textureSample_d6b281 + %40 = OpLabel + %41 = OpFunctionCall %void %textureSample_d6b281 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl index 56e467d1d2..30e87bd00f 100644 --- a/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/d6b281.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_d6b281() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var res : vec4 = textureSample(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl index bff2b62eeb..be4d74ebd7 100644 --- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl +++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_cube, sampler: sampler, coords: vec3) -> vec4 fn textureSample_e53267() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var res: vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl index 171df8aec5..ab598e19bb 100644 --- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_e53267() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float4 res = arg_0.Sample(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl index 171df8aec5..ab598e19bb 100644 --- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_e53267() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float4 res = arg_0.Sample(arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl index 7bfc11afec..3801b6b983 100644 --- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSample_e53267() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); vec4 res = texture(arg_0_arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.msl index f6987dafa7..f5cc1bf555 100644 --- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_e53267(texturecube tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float4 res = tint_symbol.sample(tint_symbol_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.spvasm index 7a35d91fb1..e75f05aad6 100644 --- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,27 +27,29 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %v4float = OpTypeVector %float 4 - %20 = OpTypeSampledImage %3 + %22 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %25 = OpConstantNull %v4float + %27 = OpConstantNull %v4float %textureSample_e53267 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %res = OpVariable %_ptr_Function_v4float Function %25 - OpStore %arg_2 %13 - %18 = OpLoad %7 %arg_1 - %19 = OpLoad %3 %arg_0 - %21 = OpSampledImage %20 %19 %18 - %22 = OpLoad %v3float %arg_2 - %16 = OpImageSampleImplicitLod %v4float %21 %22 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %res = OpVariable %_ptr_Function_v4float Function %27 + OpStore %arg_2 %14 + %20 = OpLoad %7 %arg_1 + %21 = OpLoad %3 %arg_0 + %23 = OpSampledImage %22 %21 %20 + %24 = OpLoad %v3float %arg_2 + %18 = OpImageSampleImplicitLod %v4float %23 %24 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %27 = OpLabel - %28 = OpFunctionCall %void %textureSample_e53267 + %29 = OpLabel + %30 = OpFunctionCall %void %textureSample_e53267 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl index 457d7c76f9..7d409db2ab 100644 --- a/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/e53267.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_e53267() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var res : vec4 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl index 5d28850d94..21f858d5bc 100644 --- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl +++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl @@ -25,7 +25,7 @@ // fn textureSample(texture: texture_depth_cube, sampler: sampler, coords: vec3) -> f32 fn textureSample_ea7030() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var res: f32 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl index 35bbed727f..454ec68ead 100644 --- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_ea7030() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float res = arg_0.Sample(arg_1, arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl index 35bbed727f..454ec68ead 100644 --- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSample_ea7030() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float res = arg_0.Sample(arg_1, arg_2).x; } diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl index 5658098169..18eee2181f 100644 --- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureSample_ea7030() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float res = texture(arg_0_arg_1, vec4(arg_2, 0.0f)); } diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.msl index daefdff15f..5b614e43b4 100644 --- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSample_ea7030(depthcube tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float res = tint_symbol.sample(tint_symbol_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.spvasm index b7bf9af197..1fc321ec3c 100644 --- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 30 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,28 +27,30 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %v4float = OpTypeVector %float 4 - %21 = OpTypeSampledImage %3 + %23 = OpTypeSampledImage %3 %_ptr_Function_float = OpTypePointer Function %float - %26 = OpConstantNull %float + %28 = OpConstantNull %float %textureSample_ea7030 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %res = OpVariable %_ptr_Function_float Function %26 - OpStore %arg_2 %13 - %19 = OpLoad %7 %arg_1 - %20 = OpLoad %3 %arg_0 - %22 = OpSampledImage %21 %20 %19 - %23 = OpLoad %v3float %arg_2 - %17 = OpImageSampleImplicitLod %v4float %22 %23 - %16 = OpCompositeExtract %float %17 0 - OpStore %res %16 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %res = OpVariable %_ptr_Function_float Function %28 + OpStore %arg_2 %14 + %21 = OpLoad %7 %arg_1 + %22 = OpLoad %3 %arg_0 + %24 = OpSampledImage %23 %22 %21 + %25 = OpLoad %v3float %arg_2 + %19 = OpImageSampleImplicitLod %v4float %24 %25 + %18 = OpCompositeExtract %float %19 0 + OpStore %res %18 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %28 = OpLabel - %29 = OpFunctionCall %void %textureSample_ea7030 + %30 = OpLabel + %31 = OpFunctionCall %void %textureSample_ea7030 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl index db6574c48d..312fb8a63f 100644 --- a/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSample/ea7030.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSample_ea7030() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var res : f32 = textureSample(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl index dbe6d14e9c..f908bae674 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBaseClampToEdge(texture: texture_external, sampler: sampler, coords: vec2) -> vec4 fn textureSampleBaseClampToEdge_7c04e6() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var res: vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl index 629c97abf8..c64a7595b0 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.dxc.hlsl @@ -91,7 +91,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleBaseClampToEdge_7c04e6() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl index 629c97abf8..c64a7595b0 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.fxc.hlsl @@ -91,7 +91,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleBaseClampToEdge_7c04e6() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl index c791249d35..a7c54d9a9e 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.glsl @@ -58,7 +58,7 @@ uniform highp sampler2D ext_tex_plane_1_1; uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner); } @@ -136,7 +136,7 @@ uniform highp sampler2D ext_tex_plane_1_1; uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner); } @@ -208,7 +208,7 @@ uniform highp sampler2D ext_tex_plane_1_1; uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleBaseClampToEdge_7c04e6() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureSampleExternal(arg_0_1, ext_tex_plane_1_1, arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl index a712ee821e..33c183ccea 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.msl @@ -64,7 +64,7 @@ float4 textureSampleExternal(texture2d plane0, texture2d< } void textureSampleBaseClampToEdge_7c04e6(texture2d tint_symbol_1, texture2d tint_symbol_2, sampler tint_symbol_3, const constant ExternalTextureParams* const tint_symbol_4) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, arg_2, *(tint_symbol_4)); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm index 76ec8853ca..ac6a1b995a 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 166 +; Bound: 167 ; Schema: 0 OpCapability Shader OpCapability ImageQuery @@ -128,10 +128,11 @@ %119 = OpConstantNull %uint %void = OpTypeVoid %137 = OpTypeFunction %void + %141 = OpConstantComposite %v2float %float_1 %float_1 %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %153 = OpTypeFunction %v4float + %154 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %25 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -245,36 +246,36 @@ %140 = OpLabel %arg_2 = OpVariable %_ptr_Function_v2float Function %87 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %87 - %143 = OpLoad %11 %arg_0 - %144 = OpLoad %11 %ext_tex_plane_1 - %145 = OpLoad %24 %arg_1 - %146 = OpLoad %v2float %arg_2 - %149 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %150 = OpLoad %ExternalTextureParams %149 - %142 = OpFunctionCall %v4float %textureSampleExternal %143 %144 %145 %146 %150 - OpStore %res %142 + OpStore %arg_2 %141 + %144 = OpLoad %11 %arg_0 + %145 = OpLoad %11 %ext_tex_plane_1 + %146 = OpLoad %24 %arg_1 + %147 = OpLoad %v2float %arg_2 + %150 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %151 = OpLoad %ExternalTextureParams %150 + %143 = OpFunctionCall %v4float %textureSampleExternal %144 %145 %146 %147 %151 + OpStore %res %143 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %153 - %155 = OpLabel - %156 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 +%vertex_main_inner = OpFunction %v4float None %154 + %156 = OpLabel + %157 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %137 - %158 = OpLabel - %159 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %159 + %159 = OpLabel + %160 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %160 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %137 - %161 = OpLabel - %162 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 + %162 = OpLabel + %163 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %137 - %164 = OpLabel - %165 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 + %165 = OpLabel + %166 = OpFunctionCall %void %textureSampleBaseClampToEdge_7c04e6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl index ec8947ef5b..55d13b77a7 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBaseClampToEdge_7c04e6() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var res : vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl index 54192fcd79..e45b57548d 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBaseClampToEdge(texture: texture_2d, sampler: sampler, coords: vec2) -> vec4 fn textureSampleBaseClampToEdge_9ca02c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var res: vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl index 1e3e8bdc72..8382f634dc 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.dxc.hlsl @@ -11,7 +11,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBaseClampToEdge_9ca02c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl index 1e3e8bdc72..8382f634dc 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.fxc.hlsl @@ -11,7 +11,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBaseClampToEdge_9ca02c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = tint_textureSampleBaseClampToEdge(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl index 0a11b0e638..f746b03b37 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.glsl @@ -11,7 +11,7 @@ vec4 tint_textureSampleBaseClampToEdge(highp sampler2D t_1, highp sampler2D t_s, uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, arg_2); } @@ -42,7 +42,7 @@ vec4 tint_textureSampleBaseClampToEdge(highp sampler2D t_1, highp sampler2D t_s, uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, arg_2); } @@ -67,7 +67,7 @@ vec4 tint_textureSampleBaseClampToEdge(highp sampler2D t_1, highp sampler2D t_s, uniform highp sampler2D arg_0_1; uniform highp sampler2D arg_0_arg_1; void textureSampleBaseClampToEdge_9ca02c() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = tint_textureSampleBaseClampToEdge(arg_0_1, arg_0_arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl index 04222ae1e6..f582c805ed 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.msl @@ -9,7 +9,7 @@ float4 tint_textureSampleBaseClampToEdge(texture2d t, sam } void textureSampleBaseClampToEdge_9ca02c(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float4 res = tint_textureSampleBaseClampToEdge(tint_symbol_1, tint_symbol_2, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm index 31905a1c74..b9de7956cb 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 66 +; Bound: 67 ; Schema: 0 OpCapability Shader OpCapability ImageQuery @@ -61,8 +61,9 @@ %40 = OpTypeSampledImage %11 %void = OpTypeVoid %42 = OpTypeFunction %void + %46 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %53 = OpTypeFunction %v4float + %54 = OpTypeFunction %v4float %tint_textureSampleBaseClampToEdge = OpFunction %v4float None %15 %t = OpFunctionParameter %11 %s = OpFunctionParameter %14 @@ -83,33 +84,33 @@ %45 = OpLabel %arg_2 = OpVariable %_ptr_Function_v2float Function %37 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %37 - %48 = OpLoad %11 %arg_0 - %49 = OpLoad %14 %arg_1 - %50 = OpLoad %v2float %arg_2 - %47 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %48 %49 %50 - OpStore %res %47 + OpStore %arg_2 %46 + %49 = OpLoad %11 %arg_0 + %50 = OpLoad %14 %arg_1 + %51 = OpLoad %v2float %arg_2 + %48 = OpFunctionCall %v4float %tint_textureSampleBaseClampToEdge %49 %50 %51 + OpStore %res %48 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %53 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c +%vertex_main_inner = OpFunction %v4float None %54 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %42 - %58 = OpLabel - %59 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %59 + %59 = OpLabel + %60 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %60 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %42 - %61 = OpLabel - %62 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c + %62 = OpLabel + %63 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %42 - %64 = OpLabel - %65 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c + %65 = OpLabel + %66 = OpFunctionCall %void %textureSampleBaseClampToEdge_9ca02c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl index a70dd354f3..50130e171f 100644 --- a/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBaseClampToEdge/9ca02c.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBaseClampToEdge_9ca02c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var res : vec4 = textureSampleBaseClampToEdge(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl index 328137e7ec..c783034244 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, bias: f32) -> vec4 fn textureSampleBias_1c707e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl index 0812196119..5c5477d6ca 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_1c707e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl index 0812196119..5c5477d6ca 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_1c707e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl index 21854073b6..ac47fee575 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_1c707e() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl index a7de0c8db5..137fdb080d 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_1c707e(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm index 22a6cdec61..12fa1f8ab6 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,45 +29,46 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float + %25 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %29 = OpTypeSampledImage %3 + %30 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %41 = OpConstantNull %v4float + %42 = OpConstantNull %v4float %textureSampleBias_1c707e = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_v4float Function %41 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %42 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %27 = OpLoad %7 %arg_1 - %28 = OpLoad %3 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %32 = OpLoad %v2float %arg_2 - %33 = OpCompositeExtract %float %32 0 - %34 = OpCompositeExtract %float %32 1 - %36 = OpLoad %uint %arg_3 - %35 = OpConvertUToF %float %36 - %37 = OpCompositeConstruct %v3float %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38 - OpStore %res %25 + %28 = OpLoad %7 %arg_1 + %29 = OpLoad %3 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %33 = OpLoad %v2float %arg_2 + %34 = OpCompositeExtract %float %33 0 + %35 = OpCompositeExtract %float %33 1 + %37 = OpLoad %uint %arg_3 + %36 = OpConvertUToF %float %37 + %38 = OpCompositeConstruct %v3float %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleBias_1c707e + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleBias_1c707e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl index 674136f324..5baf826bea 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/1c707e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_1c707e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl index 56dd499e50..fca7000213 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_53b9f7() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl index 6fd71337d3..53cba96055 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_53b9f7() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl index 6fd71337d3..53cba96055 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_53b9f7() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl index 26298693d3..b6be7d7ffc 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSampleBias_53b9f7() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = texture(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.msl index c9ed71a013..e9e8884c5b 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_53b9f7(texturecube tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm index 58add6655c..1881889c64 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,33 +28,34 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float + %20 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %24 = OpTypeSampledImage %3 + %25 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpConstantNull %v4float + %31 = OpConstantNull %v4float %textureSampleBias_53b9f7 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_v4float Function %30 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_v4float Function %31 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %22 = OpLoad %7 %arg_1 - %23 = OpLoad %3 %arg_0 - %25 = OpSampledImage %24 %23 %22 - %26 = OpLoad %v3float %arg_2 - %27 = OpLoad %float %arg_3 - %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias %27 - OpStore %res %20 + %23 = OpLoad %7 %arg_1 + %24 = OpLoad %3 %arg_0 + %26 = OpSampledImage %25 %24 %23 + %27 = OpLoad %v3float %arg_2 + %28 = OpLoad %float %arg_3 + %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias %28 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSampleBias_53b9f7 + %33 = OpLabel + %34 = OpFunctionCall %void %textureSampleBias_53b9f7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl index b3ca71df60..013d566168 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/53b9f7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_53b9f7() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl index db6c22f284..b21f9845bc 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl @@ -25,9 +25,9 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32, @const offset: vec3) -> vec4 fn textureSampleBias_594824() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; - const arg_4 = vec3(); + const arg_4 = vec3(1i); var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl index fa703bc6ab..d0317841f9 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_594824() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xxx); + float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl index fa703bc6ab..d0317841f9 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_594824() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xxx); + float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xxx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl index 86b3985586..e8156dbebf 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.glsl @@ -4,9 +4,9 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleBias_594824() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; - vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(0), arg_3); + vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec3(1), arg_3); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl index b1579e031f..46b053ac28 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleBias_594824(texture3d tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), int3(0)); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), int3(1)); } fragment void fragment_main(texture3d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.spvasm index 2360528652..2a8998dbf2 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,36 +28,38 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float + %20 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %24 = OpTypeSampledImage %3 + %25 = OpTypeSampledImage %3 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %30 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpConstantNull %v4float + %35 = OpConstantNull %v4float %textureSampleBias_594824 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_v4float Function %33 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_v4float Function %35 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %22 = OpLoad %7 %arg_1 - %23 = OpLoad %3 %arg_0 - %25 = OpSampledImage %24 %23 %22 - %26 = OpLoad %v3float %arg_2 - %27 = OpLoad %float %arg_3 - %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias|ConstOffset %27 %30 - OpStore %res %20 + %23 = OpLoad %7 %arg_1 + %24 = OpLoad %3 %arg_0 + %26 = OpSampledImage %25 %24 %23 + %27 = OpLoad %v3float %arg_2 + %28 = OpLoad %float %arg_3 + %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias|ConstOffset %28 %32 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleBias_594824 + %37 = OpLabel + %38 = OpFunctionCall %void %textureSampleBias_594824 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl index c271970f8d..ff3c1c0622 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/594824.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_594824() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; - const arg_4 = vec3(); + const arg_4 = vec3(1i); var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl index b142eff36f..01d7ab4f3c 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32) -> vec4 fn textureSampleBias_6a9113() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl index 95c453b6eb..daef964940 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_6a9113() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl index 95c453b6eb..daef964940 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_6a9113() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl index 4ff6ea8165..738eb8177a 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleBias_6a9113() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; vec4 res = texture(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.msl index a60a0d69a6..31f81b9ddf 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_6a9113(texture2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm index 75ae173e65..3ebab6b39b 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,33 +28,34 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float + %20 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %24 = OpTypeSampledImage %3 + %25 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpConstantNull %v4float + %31 = OpConstantNull %v4float %textureSampleBias_6a9113 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_v4float Function %30 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_v4float Function %31 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %22 = OpLoad %7 %arg_1 - %23 = OpLoad %3 %arg_0 - %25 = OpSampledImage %24 %23 %22 - %26 = OpLoad %v2float %arg_2 - %27 = OpLoad %float %arg_3 - %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias %27 - OpStore %res %20 + %23 = OpLoad %7 %arg_1 + %24 = OpLoad %3 %arg_0 + %26 = OpSampledImage %25 %24 %23 + %27 = OpLoad %v2float %arg_2 + %28 = OpLoad %float %arg_3 + %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias %28 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSampleBias_6a9113 + %33 = OpLabel + %34 = OpFunctionCall %void %textureSampleBias_6a9113 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl index 119bbcac37..532fbbe7a2 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/6a9113.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_6a9113() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl index cfded589e6..e0c88615c5 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_80e579() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl index 27ee32dc62..0e3bcba0c0 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_80e579() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl index 27ee32dc62..0e3bcba0c0 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_80e579() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl index 4b8b55e655..cdf9c71f0f 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_80e579() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; vec4 res = texture(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.msl index 310f5493d5..982a2b6c15 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_80e579(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.spvasm index 2afe0dfba7..76efd81c05 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,45 +29,46 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float + %25 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %29 = OpTypeSampledImage %3 + %30 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %41 = OpConstantNull %v4float + %42 = OpConstantNull %v4float %textureSampleBias_80e579 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_v4float Function %41 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %42 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %27 = OpLoad %7 %arg_1 - %28 = OpLoad %3 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %32 = OpLoad %v2float %arg_2 - %33 = OpCompositeExtract %float %32 0 - %34 = OpCompositeExtract %float %32 1 - %36 = OpLoad %int %arg_3 - %35 = OpConvertSToF %float %36 - %37 = OpCompositeConstruct %v3float %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38 - OpStore %res %25 + %28 = OpLoad %7 %arg_1 + %29 = OpLoad %3 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %33 = OpLoad %v2float %arg_2 + %34 = OpCompositeExtract %float %33 0 + %35 = OpCompositeExtract %float %33 1 + %37 = OpLoad %int %arg_3 + %36 = OpConvertSToF %float %37 + %38 = OpCompositeConstruct %v3float %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleBias_80e579 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleBias_80e579 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl index 4b76b6f6de..4a7835932a 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/80e579.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_80e579() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl index 2ffa8d449e..75c7373c63 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl @@ -25,10 +25,10 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_87915c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl index b1edf8bfba..8d7ff396bc 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_87915c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl index b1edf8bfba..8d7ff396bc 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_87915c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl index b2b2648957..06cb44aea9 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.glsl @@ -4,10 +4,10 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_87915c() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0), arg_4); + vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1), arg_4); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl index 37303ae0a4..1232dd512e 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleBias_87915c(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm index d8da7ba356..d9a8476464 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,48 +29,50 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float + %25 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %29 = OpTypeSampledImage %3 + %30 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %41 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %43 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %44 = OpConstantNull %v4float + %46 = OpConstantNull %v4float %textureSampleBias_87915c = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_v4float Function %44 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %46 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %27 = OpLoad %7 %arg_1 - %28 = OpLoad %3 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %32 = OpLoad %v2float %arg_2 - %33 = OpCompositeExtract %float %32 0 - %34 = OpCompositeExtract %float %32 1 - %36 = OpLoad %uint %arg_3 - %35 = OpConvertUToF %float %36 - %37 = OpCompositeConstruct %v3float %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias|ConstOffset %38 %41 - OpStore %res %25 + %28 = OpLoad %7 %arg_1 + %29 = OpLoad %3 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %33 = OpLoad %v2float %arg_2 + %34 = OpCompositeExtract %float %33 0 + %35 = OpCompositeExtract %float %33 1 + %37 = OpLoad %uint %arg_3 + %36 = OpConvertUToF %float %37 + %38 = OpCompositeConstruct %v3float %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias|ConstOffset %39 %43 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleBias_87915c + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleBias_87915c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl index ff54de70c1..e25a562b4d 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/87915c.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_87915c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl index 8c4c4caf31..0f3e7c5879 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl @@ -25,10 +25,10 @@ // fn textureSampleBias(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_9dbb51() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl index 83ce4b85a5..10dfcf302d 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_9dbb51() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl index 83ce4b85a5..10dfcf302d 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_9dbb51() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl index fcb897f30c..0a1a04ee9e 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.glsl @@ -4,10 +4,10 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleBias_9dbb51() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(0), arg_4); + vec4 res = textureOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), ivec2(1), arg_4); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl index 811369d09f..c55ab293ed 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleBias_9dbb51(texture2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4), int2(1)); } fragment void fragment_main(texture2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.spvasm index bca222ed22..d1511f42ba 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 47 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,47 +29,48 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float + %25 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %29 = OpTypeSampledImage %3 + %30 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %40 = OpConstantNull %v2int + %41 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %43 = OpConstantNull %v4float + %44 = OpConstantNull %v4float %textureSampleBias_9dbb51 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_v4float Function %43 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %44 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %27 = OpLoad %7 %arg_1 - %28 = OpLoad %3 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %32 = OpLoad %v2float %arg_2 - %33 = OpCompositeExtract %float %32 0 - %34 = OpCompositeExtract %float %32 1 - %36 = OpLoad %int %arg_3 - %35 = OpConvertSToF %float %36 - %37 = OpCompositeConstruct %v3float %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias|ConstOffset %38 %40 - OpStore %res %25 + %28 = OpLoad %7 %arg_1 + %29 = OpLoad %3 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %33 = OpLoad %v2float %arg_2 + %34 = OpCompositeExtract %float %33 0 + %35 = OpCompositeExtract %float %33 1 + %37 = OpLoad %int %arg_3 + %36 = OpConvertSToF %float %37 + %38 = OpCompositeConstruct %v3float %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias|ConstOffset %39 %41 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %45 = OpLabel - %46 = OpFunctionCall %void %textureSampleBias_9dbb51 + %46 = OpLabel + %47 = OpFunctionCall %void %textureSampleBias_9dbb51 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl index 4216bf6d3e..8f61e658ce 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/9dbb51.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_9dbb51() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl index 97f7474c4f..dcbacbb30f 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl @@ -25,9 +25,9 @@ // fn textureSampleBias(texture: texture_2d, sampler: sampler, coords: vec2, bias: f32, @const offset: vec2) -> vec4 fn textureSampleBias_a161cf() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl index 89d28fcd69..f9a8c9bdcc 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_a161cf() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xx); + float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl index 89d28fcd69..f9a8c9bdcc 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_a161cf() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (0).xx); + float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl index fc23dd4b28..315d0e06cb 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.glsl @@ -4,9 +4,9 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleBias_a161cf() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(0), arg_3); + vec4 res = textureOffset(arg_0_arg_1, arg_2, ivec2(1), arg_3); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl index 26145c4757..040f25182a 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleBias_a161cf(texture2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; - float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), int2(0)); + float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3), int2(1)); } fragment void fragment_main(texture2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.spvasm index b4513e6aed..ee1997ae87 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 37 +; Bound: 39 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,36 +28,38 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float + %20 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %24 = OpTypeSampledImage %3 + %25 = OpTypeSampledImage %3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %30 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %32 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %33 = OpConstantNull %v4float + %35 = OpConstantNull %v4float %textureSampleBias_a161cf = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_v4float Function %33 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_v4float Function %35 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %22 = OpLoad %7 %arg_1 - %23 = OpLoad %3 %arg_0 - %25 = OpSampledImage %24 %23 %22 - %26 = OpLoad %v2float %arg_2 - %27 = OpLoad %float %arg_3 - %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias|ConstOffset %27 %30 - OpStore %res %20 + %23 = OpLoad %7 %arg_1 + %24 = OpLoad %3 %arg_0 + %26 = OpSampledImage %25 %24 %23 + %27 = OpLoad %v2float %arg_2 + %28 = OpLoad %float %arg_3 + %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias|ConstOffset %28 %32 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %35 = OpLabel - %36 = OpFunctionCall %void %textureSampleBias_a161cf + %37 = OpLabel + %38 = OpFunctionCall %void %textureSampleBias_a161cf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl index 2c24a5f745..877ccaf618 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/a161cf.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_a161cf() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl index 666511e99e..7d318c3867 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32, bias: f32) -> vec4 fn textureSampleBias_c6953d() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl index f8272aecce..a059deff2f 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_c6953d() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl index f8272aecce..a059deff2f 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_c6953d() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl index b06231c66f..399530455b 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_c6953d(texturecube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm index 966a391871..810f45de28 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -30,45 +30,46 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float + %25 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %29 = OpTypeSampledImage %3 + %30 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %41 = OpConstantNull %v4float + %42 = OpConstantNull %v4float %textureSampleBias_c6953d = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_v4float Function %41 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %42 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %27 = OpLoad %7 %arg_1 - %28 = OpLoad %3 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v3float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %34 = OpCompositeExtract %float %31 2 - %36 = OpLoad %uint %arg_3 - %35 = OpConvertUToF %float %36 - %37 = OpCompositeConstruct %v4float %32 %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38 - OpStore %res %25 + %28 = OpLoad %7 %arg_1 + %29 = OpLoad %3 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %35 = OpCompositeExtract %float %32 2 + %37 = OpLoad %uint %arg_3 + %36 = OpConvertUToF %float %37 + %38 = OpCompositeConstruct %v4float %33 %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleBias_c6953d + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleBias_c6953d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl index 31476a45c3..226af92bef 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/c6953d.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_c6953d() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl index b8624599b7..f4b1477472 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_3d, sampler: sampler, coords: vec3, bias: f32) -> vec4 fn textureSampleBias_d3fa1b() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl index 653f13e9c4..c33134c53e 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_d3fa1b() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl index 653f13e9c4..c33134c53e 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_d3fa1b() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl index 19f7ed419d..9045a9b3d2 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleBias_d3fa1b() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = texture(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.msl index d0ca622a21..debd91876f 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_d3fa1b(texture3d tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, bias(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm index efaf6083b4..d3a2da1895 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 35 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,33 +28,34 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float + %20 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %24 = OpTypeSampledImage %3 + %25 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %30 = OpConstantNull %v4float + %31 = OpConstantNull %v4float %textureSampleBias_d3fa1b = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_v4float Function %30 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_v4float Function %31 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %22 = OpLoad %7 %arg_1 - %23 = OpLoad %3 %arg_0 - %25 = OpSampledImage %24 %23 %22 - %26 = OpLoad %v3float %arg_2 - %27 = OpLoad %float %arg_3 - %20 = OpImageSampleImplicitLod %v4float %25 %26 Bias %27 - OpStore %res %20 + %23 = OpLoad %7 %arg_1 + %24 = OpLoad %3 %arg_0 + %26 = OpSampledImage %25 %24 %23 + %27 = OpLoad %v3float %arg_2 + %28 = OpLoad %float %arg_3 + %21 = OpImageSampleImplicitLod %v4float %26 %27 Bias %28 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSampleBias_d3fa1b + %33 = OpLabel + %34 = OpFunctionCall %void %textureSampleBias_d3fa1b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl index c7a52318d0..6bbdd3ab67 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/d3fa1b.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_d3fa1b() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl index 7c7de5d51a..e5679f76cc 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl @@ -25,7 +25,7 @@ // fn textureSampleBias(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, bias: f32) -> vec4 fn textureSampleBias_eed7c4() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl index 4c225b0104..02d7069760 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_eed7c4() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl index 4c225b0104..02d7069760 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleBias_eed7c4() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.msl index 5017e44af1..1ff60f1e90 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleBias_eed7c4(texturecube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float4 res = tint_symbol.sample(tint_symbol_1, arg_2, arg_3, bias(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.spvasm index 82c77fb665..6f53582ba9 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -30,45 +30,46 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float + %25 = OpConstantNull %float %v4float = OpTypeVector %float 4 - %29 = OpTypeSampledImage %3 + %30 = OpTypeSampledImage %3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %41 = OpConstantNull %v4float + %42 = OpConstantNull %v4float %textureSampleBias_eed7c4 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_v4float Function %41 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_v4float Function %42 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %27 = OpLoad %7 %arg_1 - %28 = OpLoad %3 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v3float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %34 = OpCompositeExtract %float %31 2 - %36 = OpLoad %int %arg_3 - %35 = OpConvertSToF %float %36 - %37 = OpCompositeConstruct %v4float %32 %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleImplicitLod %v4float %30 %37 Bias %38 - OpStore %res %25 + %28 = OpLoad %7 %arg_1 + %29 = OpLoad %3 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %35 = OpCompositeExtract %float %32 2 + %37 = OpLoad %int %arg_3 + %36 = OpConvertSToF %float %37 + %38 = OpCompositeConstruct %v4float %33 %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleImplicitLod %v4float %31 %38 Bias %39 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleBias_eed7c4 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleBias_eed7c4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl index d5a885b609..370747d0eb 100644 --- a/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleBias/eed7c4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleBias_eed7c4() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : vec4 = textureSampleBias(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl index 25c3c54e77..cbc343754e 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompare_1912e5() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl index 88f73a7fc7..5b8163fa69 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_1912e5() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl index 88f73a7fc7..5b8163fa69 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_1912e5() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl index 223d875e3c..b92236ab2b 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_1912e5(depthcube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm index 1cd357b36e..4b70484f6d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -30,43 +30,44 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float - %28 = OpTypeSampledImage %3 + %25 = OpConstantNull %float + %29 = OpTypeSampledImage %3 %v4float = OpTypeVector %float 4 %textureSampleCompare_1912e5 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_float Function %24 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %25 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %26 = OpLoad %7 %arg_1 - %27 = OpLoad %3 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %31 = OpLoad %v3float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %34 = OpCompositeExtract %float %31 2 - %36 = OpLoad %uint %arg_3 - %35 = OpConvertUToF %float %36 - %37 = OpCompositeConstruct %v4float %32 %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleDrefImplicitLod %float %29 %37 %38 - OpStore %res %25 + %27 = OpLoad %7 %arg_1 + %28 = OpLoad %3 %arg_0 + %30 = OpSampledImage %29 %28 %27 + %32 = OpLoad %v3float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %35 = OpCompositeExtract %float %32 2 + %37 = OpLoad %uint %arg_3 + %36 = OpConvertUToF %float %37 + %38 = OpCompositeConstruct %v4float %33 %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleDrefImplicitLod %float %30 %38 %39 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompare_1912e5 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleCompare_1912e5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl index c8a2275b3c..6668830cd7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/1912e5.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_1912e5() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl index e10e5036ee..fe0c27fbab 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompare_3a5923() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl index 3bc8810b56..57c2cf9ad6 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_3a5923() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float res = arg_0.SampleCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl index 3bc8810b56..57c2cf9ad6 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_3a5923() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float res = arg_0.SampleCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl index 3de47a5e46..0bb26bbda4 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompare_3a5923() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec3(arg_2, arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.msl index a4ccb01b8f..6ca4c0d6b8 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_3a5923(depth2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm index b8f13d0c93..f9f7536ee4 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,30 +28,31 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float - %23 = OpTypeSampledImage %3 + %20 = OpConstantNull %float + %24 = OpTypeSampledImage %3 %textureSampleCompare_3a5923 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_float Function %19 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_float Function %20 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %21 = OpLoad %7 %arg_1 - %22 = OpLoad %3 %arg_0 - %24 = OpSampledImage %23 %22 %21 - %25 = OpLoad %v2float %arg_2 - %26 = OpLoad %float %arg_3 - %20 = OpImageSampleDrefImplicitLod %float %24 %25 %26 - OpStore %res %20 + %22 = OpLoad %7 %arg_1 + %23 = OpLoad %3 %arg_0 + %25 = OpSampledImage %24 %23 %22 + %26 = OpLoad %v2float %arg_2 + %27 = OpLoad %float %arg_3 + %21 = OpImageSampleDrefImplicitLod %float %25 %26 %27 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSampleCompare_3a5923 + %30 = OpLabel + %31 = OpFunctionCall %void %textureSampleCompare_3a5923 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl index 9afca36f34..bd314d6702 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/3a5923.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_3a5923() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl index 02fe640cba..e9ae16b0d4 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompare_63fb83() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl index 01de180398..7d3ca77ac9 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_63fb83() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float res = arg_0.SampleCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl index 01de180398..7d3ca77ac9 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_63fb83() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float res = arg_0.SampleCmp(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl index d83c925b15..9a48a46246 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompare_63fb83() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec4(arg_2, arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.msl index 826159e5bc..d9fecce513 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_63fb83(depthcube tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm index dde09fdc78..eab7849b1d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 31 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,30 +28,31 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float - %23 = OpTypeSampledImage %3 + %20 = OpConstantNull %float + %24 = OpTypeSampledImage %3 %textureSampleCompare_63fb83 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_float Function %19 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_float Function %20 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %21 = OpLoad %7 %arg_1 - %22 = OpLoad %3 %arg_0 - %24 = OpSampledImage %23 %22 %21 - %25 = OpLoad %v3float %arg_2 - %26 = OpLoad %float %arg_3 - %20 = OpImageSampleDrefImplicitLod %float %24 %25 %26 - OpStore %res %20 + %22 = OpLoad %7 %arg_1 + %23 = OpLoad %3 %arg_0 + %25 = OpSampledImage %24 %23 %22 + %26 = OpLoad %v3float %arg_2 + %27 = OpLoad %float %arg_3 + %21 = OpImageSampleDrefImplicitLod %float %25 %26 %27 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %29 = OpLabel - %30 = OpFunctionCall %void %textureSampleCompare_63fb83 + %30 = OpLabel + %31 = OpFunctionCall %void %textureSampleCompare_63fb83 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl index b52c5900a3..5a5a765c26 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/63fb83.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_63fb83() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl index 88b89b0391..04a3439faf 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl @@ -25,10 +25,10 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_7b5025() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl index e57c768820..b198097071 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_7b5025() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl index e57c768820..b198097071 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_7b5025() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl index 1a601d263a..4fc5720c91 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleCompare_7b5025(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm index 66b0addf30..d6a699bf8c 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 45 +; Bound: 47 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,45 +29,47 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float - %28 = OpTypeSampledImage %3 + %25 = OpConstantNull %float + %29 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %40 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %42 = OpConstantComposite %v2int %int_1 %int_1 %textureSampleCompare_7b5025 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_float Function %24 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %25 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %26 = OpLoad %7 %arg_1 - %27 = OpLoad %3 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %31 = OpLoad %v2float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %35 = OpLoad %uint %arg_3 - %34 = OpConvertUToF %float %35 - %36 = OpCompositeConstruct %v3float %32 %33 %34 - %37 = OpLoad %float %arg_4 - %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 ConstOffset %40 - OpStore %res %25 + %27 = OpLoad %7 %arg_1 + %28 = OpLoad %3 %arg_0 + %30 = OpSampledImage %29 %28 %27 + %32 = OpLoad %v2float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %36 = OpLoad %uint %arg_3 + %35 = OpConvertUToF %float %36 + %37 = OpCompositeConstruct %v3float %33 %34 %35 + %38 = OpLoad %float %arg_4 + %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38 ConstOffset %42 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompare_7b5025 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleCompare_7b5025 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl index a2f8e2d848..7df4e6fba9 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/7b5025.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_7b5025() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl index 6f2ab25cf2..94aa4fe147 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompare_90ae56() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl index 048e28e5c6..6f59515b8f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_90ae56() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl index 048e28e5c6..6f59515b8f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_90ae56() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl index aab30eb526..1999c7ee43 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompare_90ae56() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl index 5b7cfbdf11..d88ca51214 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_90ae56(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm index ccfd3f42bb..56a26c3f08 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,42 +29,43 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %20 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float - %28 = OpTypeSampledImage %3 + %25 = OpConstantNull %float + %29 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %textureSampleCompare_90ae56 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_uint Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_float Function %24 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_uint Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %25 + OpStore %arg_2 %14 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %26 = OpLoad %7 %arg_1 - %27 = OpLoad %3 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %31 = OpLoad %v2float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %35 = OpLoad %uint %arg_3 - %34 = OpConvertUToF %float %35 - %36 = OpCompositeConstruct %v3float %32 %33 %34 - %37 = OpLoad %float %arg_4 - %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 - OpStore %res %25 + %27 = OpLoad %7 %arg_1 + %28 = OpLoad %3 %arg_0 + %30 = OpSampledImage %29 %28 %27 + %32 = OpLoad %v2float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %36 = OpLoad %uint %arg_3 + %35 = OpConvertUToF %float %36 + %37 = OpCompositeConstruct %v3float %33 %34 %35 + %38 = OpLoad %float %arg_4 + %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleCompare_90ae56 + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleCompare_90ae56 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl index 97cb0eb618..dad5b9d0fc 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/90ae56.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_90ae56() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl index 4dbfd9cbb9..adb1f559ee 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_a3ca7e() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl index 06ac88bc5c..dca9cdf7c7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_a3ca7e() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl index 06ac88bc5c..dca9cdf7c7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_a3ca7e() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.msl index 884983e782..81e30a3a71 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_a3ca7e(depthcube_array tint_symbol, sampler tint_symbol_1) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm index 8438b3e9d4..14c991bb13 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -30,43 +30,44 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %13 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %17 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float - %28 = OpTypeSampledImage %3 + %25 = OpConstantNull %float + %29 = OpTypeSampledImage %3 %v4float = OpTypeVector %float 4 %textureSampleCompare_a3ca7e = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_float Function %24 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v3float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %25 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %26 = OpLoad %7 %arg_1 - %27 = OpLoad %3 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %31 = OpLoad %v3float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %34 = OpCompositeExtract %float %31 2 - %36 = OpLoad %int %arg_3 - %35 = OpConvertSToF %float %36 - %37 = OpCompositeConstruct %v4float %32 %33 %34 %35 - %38 = OpLoad %float %arg_4 - %25 = OpImageSampleDrefImplicitLod %float %29 %37 %38 - OpStore %res %25 + %27 = OpLoad %7 %arg_1 + %28 = OpLoad %3 %arg_0 + %30 = OpSampledImage %29 %28 %27 + %32 = OpLoad %v3float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %35 = OpCompositeExtract %float %32 2 + %37 = OpLoad %int %arg_3 + %36 = OpConvertSToF %float %37 + %38 = OpCompositeConstruct %v4float %33 %34 %35 %36 + %39 = OpLoad %float %arg_4 + %26 = OpImageSampleDrefImplicitLod %float %30 %38 %39 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleCompare_a3ca7e + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleCompare_a3ca7e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl index 3c4c8f1cd8..fa3a6a895b 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/a3ca7e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_a3ca7e() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl index 9d166867f7..cde0d28f8c 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl @@ -25,10 +25,10 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_af1051() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl index ad6956408e..3a08b4197d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_af1051() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl index ad6956408e..3a08b4197d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_af1051() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl index e241a74c0e..b1cc778575 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleCompare_af1051(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4, int2(1)); } fragment void fragment_main(depth2d_array tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.spvasm index 290d5fef51..36521c58f2 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 45 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,44 +29,45 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float - %28 = OpTypeSampledImage %3 + %25 = OpConstantNull %float + %29 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %39 = OpConstantNull %v2int + %40 = OpConstantComposite %v2int %int_1 %int_1 %textureSampleCompare_af1051 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_float Function %24 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %25 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %26 = OpLoad %7 %arg_1 - %27 = OpLoad %3 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %31 = OpLoad %v2float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %35 = OpLoad %int %arg_3 - %34 = OpConvertSToF %float %35 - %36 = OpCompositeConstruct %v3float %32 %33 %34 - %37 = OpLoad %float %arg_4 - %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 ConstOffset %39 - OpStore %res %25 + %27 = OpLoad %7 %arg_1 + %28 = OpLoad %3 %arg_0 + %30 = OpSampledImage %29 %28 %27 + %32 = OpLoad %v2float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %36 = OpLoad %int %arg_3 + %35 = OpConvertSToF %float %36 + %37 = OpCompositeConstruct %v3float %33 %34 %35 + %38 = OpLoad %float %arg_4 + %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38 ConstOffset %40 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %42 = OpLabel - %43 = OpFunctionCall %void %textureSampleCompare_af1051 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleCompare_af1051 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl index c2b26358f8..60fba5e5c9 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/af1051.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_af1051() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl index 67dbb4ad52..a4d132e266 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompare(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompare_dd431d() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl index aed9ea373a..6a97450704 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dd431d() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl index aed9ea373a..6a97450704 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dd431d() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmp(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl index edba551a2b..69cd1147a7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.glsl @@ -4,7 +4,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompare_dd431d() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.msl index 525ba3b182..d9041fa9eb 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompare_dd431d(depth2d_array tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm index a5fb4fc841..4f1f1a0c6a 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 42 +; Bound: 43 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,42 +29,43 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %20 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %22 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %24 = OpConstantNull %float - %28 = OpTypeSampledImage %3 + %25 = OpConstantNull %float + %29 = OpTypeSampledImage %3 %v3float = OpTypeVector %float 3 %textureSampleCompare_dd431d = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_int Function %20 - %arg_4 = OpVariable %_ptr_Function_float Function %24 - %res = OpVariable %_ptr_Function_float Function %24 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_int Function %22 + %arg_4 = OpVariable %_ptr_Function_float Function %25 + %res = OpVariable %_ptr_Function_float Function %25 + OpStore %arg_2 %14 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %26 = OpLoad %7 %arg_1 - %27 = OpLoad %3 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %31 = OpLoad %v2float %arg_2 - %32 = OpCompositeExtract %float %31 0 - %33 = OpCompositeExtract %float %31 1 - %35 = OpLoad %int %arg_3 - %34 = OpConvertSToF %float %35 - %36 = OpCompositeConstruct %v3float %32 %33 %34 - %37 = OpLoad %float %arg_4 - %25 = OpImageSampleDrefImplicitLod %float %29 %36 %37 - OpStore %res %25 + %27 = OpLoad %7 %arg_1 + %28 = OpLoad %3 %arg_0 + %30 = OpSampledImage %29 %28 %27 + %32 = OpLoad %v2float %arg_2 + %33 = OpCompositeExtract %float %32 0 + %34 = OpCompositeExtract %float %32 1 + %36 = OpLoad %int %arg_3 + %35 = OpConvertSToF %float %36 + %37 = OpCompositeConstruct %v3float %33 %34 %35 + %38 = OpLoad %float %arg_4 + %26 = OpImageSampleDrefImplicitLod %float %30 %37 %38 + OpStore %res %26 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleCompare_dd431d + %41 = OpLabel + %42 = OpFunctionCall %void %textureSampleCompare_dd431d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl index 7026776132..c973460d05 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dd431d.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_dd431d() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl index 4487b72443..c479d1ef56 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl @@ -25,9 +25,9 @@ // fn textureSampleCompare(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompare_dec064() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl index 21bf5e0222..b955a0f4a0 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dec064() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (0).xx); + float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl index 21bf5e0222..b955a0f4a0 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompare_dec064() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (0).xx); + float res = arg_0.SampleCmp(arg_1, arg_2, arg_3, (1).xx); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl index 8adb0eeeda..01e9c58de2 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.glsl @@ -4,9 +4,9 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompare_dec064() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1)); } void fragment_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl index c22e9dd8ec..7625b7c63b 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleCompare_dec064(depth2d tint_symbol, sampler tint_symbol_1) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; - float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, int2(0)); + float res = tint_symbol.sample_compare(tint_symbol_1, arg_2, arg_3, int2(1)); } fragment void fragment_main(depth2d tint_symbol_2 [[texture(0)]], sampler tint_symbol_3 [[sampler(0)]]) { diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.spvasm index 6e55366615..97134192a6 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 34 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,33 +28,35 @@ %void = OpTypeVoid %8 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %13 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %14 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %17 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %19 = OpConstantNull %float - %23 = OpTypeSampledImage %3 + %20 = OpConstantNull %float + %24 = OpTypeSampledImage %3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %29 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %31 = OpConstantComposite %v2int %int_1 %int_1 %textureSampleCompare_dec064 = OpFunction %void None %8 %11 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %13 - %arg_3 = OpVariable %_ptr_Function_float Function %19 - %res = OpVariable %_ptr_Function_float Function %19 - OpStore %arg_2 %13 + %arg_2 = OpVariable %_ptr_Function_v2float Function %17 + %arg_3 = OpVariable %_ptr_Function_float Function %20 + %res = OpVariable %_ptr_Function_float Function %20 + OpStore %arg_2 %14 OpStore %arg_3 %float_1 - %21 = OpLoad %7 %arg_1 - %22 = OpLoad %3 %arg_0 - %24 = OpSampledImage %23 %22 %21 - %25 = OpLoad %v2float %arg_2 - %26 = OpLoad %float %arg_3 - %20 = OpImageSampleDrefImplicitLod %float %24 %25 %26 ConstOffset %29 - OpStore %res %20 + %22 = OpLoad %7 %arg_1 + %23 = OpLoad %3 %arg_0 + %25 = OpSampledImage %24 %23 %22 + %26 = OpLoad %v2float %arg_2 + %27 = OpLoad %float %arg_3 + %21 = OpImageSampleDrefImplicitLod %float %25 %26 %27 ConstOffset %31 + OpStore %res %21 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %8 - %32 = OpLabel - %33 = OpFunctionCall %void %textureSampleCompare_dec064 + %34 = OpLabel + %35 = OpFunctionCall %void %textureSampleCompare_dec064 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl index fdc41895b2..43246d22fa 100644 --- a/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompare/dec064.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompare_dec064() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : f32 = textureSampleCompare(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl index 26ae13c1ad..752117af9e 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1116ed() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl index dfdafaafad..8a156a238e 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1116ed() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl index dfdafaafad..8a156a238e 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1116ed() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl index c5a1359557..0383b2e425 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); @@ -28,7 +28,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); @@ -47,7 +47,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_1116ed() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.msl index f4bf8844b1..fc084f6319 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_1116ed(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0)); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm index fb2da605d9..c187ec1b3f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %float_0 = OpConstant %float 0 - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleCompareLevel_1116ed = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleCompareLevel_1116ed +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleCompareLevel_1116ed + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleCompareLevel_1116ed + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleCompareLevel_1116ed OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl index edd07be63c..1ef36d7358 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1116ed.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1116ed() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl index 500b566c9f..b0be6cd680 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube, sampler: sampler_comparison, coords: vec3, depth_ref: f32) -> f32 fn textureSampleCompareLevel_1568e3() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl index a0b30fbcff..fe49ba4009 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1568e3() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl index a0b30fbcff..fe49ba4009 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_1568e3() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl index d877ce43e2..d85527cf37 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec4(arg_2, arg_3)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec4(arg_2, arg_3)); } @@ -45,7 +45,7 @@ void main() { uniform highp samplerCubeShadow arg_0_arg_1; void textureSampleCompareLevel_1568e3() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec4(arg_2, arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.msl index 410b28c70d..53f4c9cb06 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_1568e3(depthcube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0)); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm index b0d97d3bec..db66d65b6f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %float_0 = OpConstant %float 0 - %35 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleCompareLevel_1568e3 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v3float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleDrefExplicitLod %float %30 %31 %32 Lod %float_0 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleDrefExplicitLod %float %31 %32 %33 Lod %float_0 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleCompareLevel_1568e3 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleCompareLevel_1568e3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_1568e3 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleCompareLevel_1568e3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleCompareLevel_1568e3 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleCompareLevel_1568e3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl index db2ba7c57f..495280362d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/1568e3.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_1568e3() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl index 5b0bda1092..dd938282de 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32) -> f32 fn textureSampleCompareLevel_2ad2b1() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl index c47f096ba8..b25f1dd8aa 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_2ad2b1() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl index c47f096ba8..b25f1dd8aa 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_2ad2b1() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl index fb730f0af0..5e9a77b034 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec3(arg_2, arg_3)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec3(arg_2, arg_3)); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_2ad2b1() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; float res = texture(arg_0_arg_1, vec3(arg_2, arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl index fb1f7ca9d8..2e023a29a0 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_2ad2b1(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0)); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm index 58b009040d..31ce90d74d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %float_0 = OpConstant %float 0 - %35 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleCompareLevel_2ad2b1 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v2float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleDrefExplicitLod %float %30 %31 %32 Lod %float_0 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleDrefExplicitLod %float %31 %32 %33 Lod %float_0 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleCompareLevel_2ad2b1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl index 698fe146de..2956adcda5 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/2ad2b1.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_2ad2b1() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl index 7496cc6944..bff8b92399 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: i32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_4cf3a2() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl index 7910d95baa..109d02d18d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_4cf3a2() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl index 7910d95baa..109d02d18d 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_4cf3a2() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl index 0378014821..2bbfa78841 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_4cf3a2(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0)); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm index e5a685673b..fe0d7cd16e 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,60 +47,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %float_0 = OpConstant %float 0 - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleCompareLevel_4cf3a2 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %36 = OpLoad %v3float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %39 = OpCompositeExtract %float %36 2 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleCompareLevel_4cf3a2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl index 3c4b44a477..081c1ec106 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/4cf3a2.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_4cf3a2() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl index 1bcb4315c5..fbb9dac565 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_7dc3c0() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl index 028390921c..90c9f70a7f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7dc3c0() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl index 028390921c..90c9f70a7f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7dc3c0() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl index 88a12ca90f..7ec21aa3bd 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); @@ -28,7 +28,7 @@ precision mediump float; uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); @@ -47,7 +47,7 @@ void main() { uniform highp sampler2DArrayShadow arg_0_arg_1; void textureSampleCompareLevel_7dc3c0() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = texture(arg_0_arg_1, vec4(vec3(arg_2, float(arg_3)), arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl index 27a6c6ec07..817418d767 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_7dc3c0(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0)); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm index e8bacfc06e..1533c38450 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %float_0 = OpConstant %float 0 - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleCompareLevel_7dc3c0 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleCompareLevel_7dc3c0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl index b15d2d4eb8..48140b29c8 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7dc3c0.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_7dc3c0() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl index 399dfb5887..72bec7b182 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl @@ -25,9 +25,9 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d, sampler: sampler_comparison, coords: vec2, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_7f2b9a() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl index 6365c43b70..a3aea8d202 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7f2b9a() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl index 6365c43b70..a3aea8d202 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_7f2b9a() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl index 0dcecc2690..c600c058bd 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleCompareLevel_7f2b9a() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(0)); + float res = textureOffset(arg_0_arg_1, vec3(arg_2, arg_3), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl index 12a1172be9..b552184306 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleCompareLevel_7f2b9a(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; - float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, level(0), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm index 8e4ef7ce83..6ea24fd25a 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,51 +45,53 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %float_0 = OpConstant %float 0 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %36 = OpConstantNull %v2int - %38 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 + %40 = OpTypeFunction %v4float %textureSampleCompareLevel_7f2b9a = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v2float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleDrefExplicitLod %float %30 %31 %32 Lod|ConstOffset %float_0 %36 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleDrefExplicitLod %float %31 %32 %33 Lod|ConstOffset %float_0 %38 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleCompareLevel_7f2b9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl index cbb72fd9cd..704668b128 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/7f2b9a.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_7f2b9a() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl index b6cd3700f5..82e5958f80 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl @@ -25,7 +25,7 @@ // fn textureSampleCompareLevel(texture: texture_depth_cube_array, sampler: sampler_comparison, coords: vec3, array_index: u32, depth_ref: f32) -> f32 fn textureSampleCompareLevel_958c87() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl index 052b573c32..3e709bb491 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_958c87() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl index 052b573c32..3e709bb491 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_958c87() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float res = arg_0.SampleCmpLevelZero(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl index bda2ec6073..c4f67276c1 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleCompareLevel_958c87(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0)); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm index 6f5a6aebe8..0ee630f814 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,60 +47,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %float_0 = OpConstant %float 0 - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleCompareLevel_958c87 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %36 = OpLoad %v3float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %39 = OpCompositeExtract %float %36 2 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod %float_0 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod %float_0 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleCompareLevel_958c87 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleCompareLevel_958c87 + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleCompareLevel_958c87 + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleCompareLevel_958c87 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl index 176df62dc0..01f883ac8f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/958c87.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_958c87() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl index 08c8a3a3aa..a9c88a7e85 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl @@ -25,10 +25,10 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: i32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_b6e47c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl index 43587976e3..ede8cdf4e3 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_b6e47c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl index 43587976e3..ede8cdf4e3 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_b6e47c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl index a20d5d2cab..a2e73b69df 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleCompareLevel_b6e47c(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm index 8401e93459..26a8b53ab5 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 61 +; Bound: 62 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,62 +46,63 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %float_0 = OpConstant %float 0 %v2int = OpTypeVector %int 2 - %46 = OpConstantNull %v2int - %48 = OpTypeFunction %v4float + %47 = OpConstantComposite %v2int %int_1 %int_1 + %49 = OpTypeFunction %v4float %textureSampleCompareLevel_b6e47c = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod|ConstOffset %float_0 %46 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod|ConstOffset %float_0 %47 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c +%vertex_main_inner = OpFunction %v4float None %49 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %54 = OpLabel + %55 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %55 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c + %57 = OpLabel + %58 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleCompareLevel_b6e47c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl index 518c525bb6..bc8518163a 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/b6e47c.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_b6e47c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl index b25925f9ad..8778005b83 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl @@ -25,10 +25,10 @@ // fn textureSampleCompareLevel(texture: texture_depth_2d_array, sampler: sampler_comparison, coords: vec2, array_index: u32, depth_ref: f32, @const offset: vec2) -> f32 fn textureSampleCompareLevel_bcb3dd() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl index a184617ca7..a6bf1813a7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_bcb3dd() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl index a184617ca7..a6bf1813a7 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerComparisonState arg_1 : register(s1, space1); void textureSampleCompareLevel_bcb3dd() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float res = arg_0.SampleCmpLevelZero(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl index ece69aabba..05c636e05f 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleCompareLevel_bcb3dd(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(0)); + float res = tint_symbol_1.sample_compare(tint_symbol_2, arg_2, arg_3, arg_4, level(0), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm index 3900cd81d9..9571f9e5ae 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 64 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,63 +46,65 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %float_0 = OpConstant %float 0 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %47 = OpConstantNull %v2int - %49 = OpTypeFunction %v4float + %int_1 = OpConstant %int 1 + %49 = OpConstantComposite %v2int %int_1 %int_1 + %51 = OpTypeFunction %v4float %textureSampleCompareLevel_bcb3dd = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleDrefExplicitLod %float %35 %42 %43 Lod|ConstOffset %float_0 %47 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleDrefExplicitLod %float %36 %43 %44 Lod|ConstOffset %float_0 %49 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %49 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd +%vertex_main_inner = OpFunction %v4float None %51 + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %55 + %56 = OpLabel + %57 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %57 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %60 = OpLabel - %61 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd + %62 = OpLabel + %63 = OpFunctionCall %void %textureSampleCompareLevel_bcb3dd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl index 1a2974a842..c62bf2eaa8 100644 --- a/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleCompareLevel/bcb3dd.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler_comparison; fn textureSampleCompareLevel_bcb3dd() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleCompareLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl index 9435ab13f8..451c787043 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl @@ -25,9 +25,9 @@ // fn textureSampleGrad(texture: texture_3d, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_21402b() { - var arg_2 = vec3(); - var arg_3 = vec3(); - var arg_4 = vec3(); + var arg_2 = vec3(1.f); + var arg_3 = vec3(1.f); + var arg_4 = vec3(1.f); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl index 037d976713..5c9e277ef3 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_21402b() { - float3 arg_2 = (0.0f).xxx; - float3 arg_3 = (0.0f).xxx; - float3 arg_4 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; + float3 arg_3 = (1.0f).xxx; + float3 arg_4 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl index 037d976713..5c9e277ef3 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_21402b() { - float3 arg_2 = (0.0f).xxx; - float3 arg_3 = (0.0f).xxx; - float3 arg_4 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; + float3 arg_3 = (1.0f).xxx; + float3 arg_4 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl index f480d789eb..594e89c6e7 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } @@ -28,9 +28,9 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } @@ -47,9 +47,9 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_21402b() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl index 8be83cd224..4d8891100a 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleGrad_21402b(texture3d tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); - float3 arg_3 = float3(0.0f); - float3 arg_4 = float3(0.0f); + float3 arg_2 = float3(1.0f); + float3 arg_3 = float3(1.0f); + float3 arg_4 = float3(1.0f); float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient3d(arg_3, arg_4)); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.spvasm index 19f41b27cf..abfec7baf5 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,50 +46,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %28 = OpTypeSampledImage %11 -%_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float + %30 = OpTypeSampledImage %11 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %37 = OpTypeFunction %v4float %textureSampleGrad_21402b = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 - %arg_4 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 + %arg_4 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - OpStore %arg_3 %20 - OpStore %arg_4 %20 - %26 = OpLoad %14 %arg_1 - %27 = OpLoad %11 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v3float %arg_2 - %31 = OpLoad %v3float %arg_3 - %32 = OpLoad %v3float %arg_4 - %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad %31 %32 - OpStore %res %25 + OpStore %arg_2 %21 + OpStore %arg_3 %21 + OpStore %arg_4 %21 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %v3float %arg_3 + %34 = OpLoad %v3float %arg_4 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad %33 %34 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleGrad_21402b +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleGrad_21402b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleGrad_21402b + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleGrad_21402b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleGrad_21402b + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleGrad_21402b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl index 4df38281a8..19b255e79b 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/21402b.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_21402b() { - var arg_2 = vec3(); - var arg_3 = vec3(); - var arg_4 = vec3(); + var arg_2 = vec3(1.0f); + var arg_3 = vec3(1.0f); + var arg_4 = vec3(1.0f); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl index a52349948c..2d7f8e1a24 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl @@ -25,10 +25,10 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_2ecd8f() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; - var arg_4 = vec2(); - var arg_5 = vec2(); + var arg_4 = vec2(1.f); + var arg_5 = vec2(1.f); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl index 51d6b37c44..21a8ee8a5b 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_2ecd8f() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl index 51d6b37c44..21a8ee8a5b 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_2ecd8f() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl index 62edc1550f..b18edb0271 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5); } @@ -29,10 +29,10 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5); } @@ -49,10 +49,10 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_2ecd8f() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl index 0fc4d01071..6dedc0525b 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleGrad_2ecd8f(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; - float2 arg_4 = float2(0.0f); - float2 arg_5 = float2(0.0f); + float2 arg_4 = float2(1.0f); + float2 arg_5 = float2(1.0f); float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5)); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm index adfcab266a..435994b71a 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -47,62 +47,63 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleGrad_2ecd8f = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_v2float Function %20 - %arg_5 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_v2float Function %24 + %arg_5 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - OpStore %arg_4 %20 - OpStore %arg_5 %20 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_3 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %42 = OpLoad %v2float %arg_4 - %43 = OpLoad %v2float %arg_5 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43 - OpStore %res %30 + OpStore %arg_4 %21 + OpStore %arg_5 %21 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %v2float %arg_4 + %45 = OpLoad %v2float %arg_5 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleGrad_2ecd8f +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleGrad_2ecd8f + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleGrad_2ecd8f + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleGrad_2ecd8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl index 84604a25fa..04e632879a 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/2ecd8f.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_2ecd8f() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; - var arg_4 = vec2(); - var arg_5 = vec2(); + var arg_4 = vec2(1.0f); + var arg_5 = vec2(1.0f); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl index d93e938159..806c605dee 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl @@ -25,9 +25,9 @@ // fn textureSampleGrad(texture: texture_2d, sampler: sampler, coords: vec2, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_521263() { - var arg_2 = vec2(); - var arg_3 = vec2(); - var arg_4 = vec2(); + var arg_2 = vec2(1.f); + var arg_3 = vec2(1.f); + var arg_4 = vec2(1.f); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl index b184cd79b9..bfe84600e6 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_521263() { - float2 arg_2 = (0.0f).xx; - float2 arg_3 = (0.0f).xx; - float2 arg_4 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; + float2 arg_3 = (1.0f).xx; + float2 arg_4 = (1.0f).xx; float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl index b184cd79b9..bfe84600e6 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_521263() { - float2 arg_2 = (0.0f).xx; - float2 arg_3 = (0.0f).xx; - float2 arg_4 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; + float2 arg_3 = (1.0f).xx; + float2 arg_4 = (1.0f).xx; float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl index eb7aee0631..0e9fd5c6b0 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec2 arg_2 = vec2(0.0f); - vec2 arg_3 = vec2(0.0f); - vec2 arg_4 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); + vec2 arg_3 = vec2(1.0f); + vec2 arg_4 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } @@ -28,9 +28,9 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec2 arg_2 = vec2(0.0f); - vec2 arg_3 = vec2(0.0f); - vec2 arg_4 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); + vec2 arg_3 = vec2(1.0f); + vec2 arg_4 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } @@ -47,9 +47,9 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_521263() { - vec2 arg_2 = vec2(0.0f); - vec2 arg_3 = vec2(0.0f); - vec2 arg_4 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); + vec2 arg_3 = vec2(1.0f); + vec2 arg_4 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl index 89f9e8756c..1494a9c4ac 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleGrad_521263(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); - float2 arg_3 = float2(0.0f); - float2 arg_4 = float2(0.0f); + float2 arg_2 = float2(1.0f); + float2 arg_3 = float2(1.0f); + float2 arg_4 = float2(1.0f); float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient2d(arg_3, arg_4)); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.spvasm index 5b90d6c400..50b4b5119c 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,50 +46,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float - %28 = OpTypeSampledImage %11 -%_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float + %30 = OpTypeSampledImage %11 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %37 = OpTypeFunction %v4float %textureSampleGrad_521263 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - OpStore %arg_3 %20 - OpStore %arg_4 %20 - %26 = OpLoad %14 %arg_1 - %27 = OpLoad %11 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_2 - %31 = OpLoad %v2float %arg_3 - %32 = OpLoad %v2float %arg_4 - %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad %31 %32 - OpStore %res %25 + OpStore %arg_2 %21 + OpStore %arg_3 %21 + OpStore %arg_4 %21 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %v2float %arg_3 + %34 = OpLoad %v2float %arg_4 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad %33 %34 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleGrad_521263 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleGrad_521263 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleGrad_521263 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleGrad_521263 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleGrad_521263 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleGrad_521263 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl index 25a38526f0..025d0d7be3 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/521263.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_521263() { - var arg_2 = vec2(); - var arg_3 = vec2(); - var arg_4 = vec2(); + var arg_2 = vec2(1.0f); + var arg_3 = vec2(1.0f); + var arg_4 = vec2(1.0f); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl index 4cd7722ea1..53c0a00eca 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl @@ -25,9 +25,9 @@ // fn textureSampleGrad(texture: texture_cube, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_5312f4() { - var arg_2 = vec3(); - var arg_3 = vec3(); - var arg_4 = vec3(); + var arg_2 = vec3(1.f); + var arg_3 = vec3(1.f); + var arg_4 = vec3(1.f); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl index 14508e1a60..61b7b3b848 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5312f4() { - float3 arg_2 = (0.0f).xxx; - float3 arg_3 = (0.0f).xxx; - float3 arg_4 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; + float3 arg_3 = (1.0f).xxx; + float3 arg_4 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl index 14508e1a60..61b7b3b848 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5312f4() { - float3 arg_2 = (0.0f).xxx; - float3 arg_3 = (0.0f).xxx; - float3 arg_4 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; + float3 arg_3 = (1.0f).xxx; + float3 arg_4 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl index 7278ce3735..ce0c1503eb 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } @@ -28,9 +28,9 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } @@ -47,9 +47,9 @@ void main() { uniform highp samplerCube arg_0_arg_1; void textureSampleGrad_5312f4() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); vec4 res = textureGrad(arg_0_arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl index d7f4659730..dcb72de42e 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleGrad_5312f4(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); - float3 arg_3 = float3(0.0f); - float3 arg_4 = float3(0.0f); + float3 arg_2 = float3(1.0f); + float3 arg_3 = float3(1.0f); + float3 arg_4 = float3(1.0f); float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradientcube(arg_3, arg_4)); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.spvasm index 149aba6073..bbb5adb126 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 49 +; Bound: 50 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,50 +46,51 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float - %28 = OpTypeSampledImage %11 -%_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float + %30 = OpTypeSampledImage %11 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %37 = OpTypeFunction %v4float %textureSampleGrad_5312f4 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 - %arg_4 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 + %arg_4 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - OpStore %arg_3 %20 - OpStore %arg_4 %20 - %26 = OpLoad %14 %arg_1 - %27 = OpLoad %11 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v3float %arg_2 - %31 = OpLoad %v3float %arg_3 - %32 = OpLoad %v3float %arg_4 - %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad %31 %32 - OpStore %res %25 + OpStore %arg_2 %21 + OpStore %arg_3 %21 + OpStore %arg_4 %21 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %v3float %arg_3 + %34 = OpLoad %v3float %arg_4 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad %33 %34 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleGrad_5312f4 +%vertex_main_inner = OpFunction %v4float None %37 + %39 = OpLabel + %40 = OpFunctionCall %void %textureSampleGrad_5312f4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %42 = OpLabel + %43 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %43 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleGrad_5312f4 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleGrad_5312f4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleGrad_5312f4 + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleGrad_5312f4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl index f4175ba165..58801e82f5 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5312f4.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_5312f4() { - var arg_2 = vec3(); - var arg_3 = vec3(); - var arg_4 = vec3(); + var arg_2 = vec3(1.0f); + var arg_3 = vec3(1.0f); + var arg_4 = vec3(1.0f); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl index 082cf54f34..8f3892c09e 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl @@ -25,10 +25,10 @@ // fn textureSampleGrad(texture: texture_3d, sampler: sampler, coords: vec3, ddx: vec3, ddy: vec3, @const offset: vec3) -> vec4 fn textureSampleGrad_5884dd() { - var arg_2 = vec3(); - var arg_3 = vec3(); - var arg_4 = vec3(); - const arg_5 = vec3(); + var arg_2 = vec3(1.f); + var arg_3 = vec3(1.f); + var arg_4 = vec3(1.f); + const arg_5 = vec3(1i); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl index 695dd3062e..05ae8f1c69 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5884dd() { - float3 arg_2 = (0.0f).xxx; - float3 arg_3 = (0.0f).xxx; - float3 arg_4 = (0.0f).xxx; - float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xxx); + float3 arg_2 = (1.0f).xxx; + float3 arg_3 = (1.0f).xxx; + float3 arg_4 = (1.0f).xxx; + float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl index 695dd3062e..05ae8f1c69 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_5884dd() { - float3 arg_2 = (0.0f).xxx; - float3 arg_3 = (0.0f).xxx; - float3 arg_4 = (0.0f).xxx; - float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xxx); + float3 arg_2 = (1.0f).xxx; + float3 arg_3 = (1.0f).xxx; + float3 arg_4 = (1.0f).xxx; + float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl index a20b4b4a49..c3bafa5e78 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(0)); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(1)); } vec4 vertex_main() { @@ -28,10 +28,10 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(0)); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(1)); } void fragment_main() { @@ -47,10 +47,10 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleGrad_5884dd() { - vec3 arg_2 = vec3(0.0f); - vec3 arg_3 = vec3(0.0f); - vec3 arg_4 = vec3(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(0)); + vec3 arg_2 = vec3(1.0f); + vec3 arg_3 = vec3(1.0f); + vec3 arg_4 = vec3(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl index 87a518a419..b9f3bf6828 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleGrad_5884dd(texture3d tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); - float3 arg_3 = float3(0.0f); - float3 arg_4 = float3(0.0f); - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient3d(arg_3, arg_4), int3(0)); + float3 arg_2 = float3(1.0f); + float3 arg_3 = float3(1.0f); + float3 arg_4 = float3(1.0f); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient3d(arg_3, arg_4), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm index cfe63ebfdc..a0799ad264 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,53 +46,55 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float - %28 = OpTypeSampledImage %11 + %24 = OpConstantNull %v3float + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %35 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureSampleGrad_5884dd = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_v3float Function %20 - %arg_4 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_v3float Function %24 + %arg_4 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - OpStore %arg_3 %20 - OpStore %arg_4 %20 - %26 = OpLoad %14 %arg_1 - %27 = OpLoad %11 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v3float %arg_2 - %31 = OpLoad %v3float %arg_3 - %32 = OpLoad %v3float %arg_4 - %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad|ConstOffset %31 %32 %35 - OpStore %res %25 + OpStore %arg_2 %21 + OpStore %arg_3 %21 + OpStore %arg_4 %21 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %v3float %arg_3 + %34 = OpLoad %v3float %arg_4 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad|ConstOffset %33 %34 %38 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleGrad_5884dd +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleGrad_5884dd + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleGrad_5884dd + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleGrad_5884dd OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl index 9a43b6981c..bd81e44339 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/5884dd.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_5884dd() { - var arg_2 = vec3(); - var arg_3 = vec3(); - var arg_4 = vec3(); - const arg_5 = vec3(); + var arg_2 = vec3(1.0f); + var arg_3 = vec3(1.0f); + var arg_4 = vec3(1.0f); + const arg_5 = vec3(1i); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl index d77c4f5c9c..ca3e634065 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl @@ -25,11 +25,11 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, ddx: vec2, ddy: vec2, @const offset: vec2) -> vec4 fn textureSampleGrad_7cd6de() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; - var arg_4 = vec2(); - var arg_5 = vec2(); - const arg_6 = vec2(); + var arg_4 = vec2(1.f); + var arg_5 = vec2(1.f); + const arg_6 = vec2(1i); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl index 9bbb852234..30e5c0854a 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.dxc.hlsl @@ -2,11 +2,11 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_7cd6de() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; - float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx); + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; + float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl index 9bbb852234..30e5c0854a 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.fxc.hlsl @@ -2,11 +2,11 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_7cd6de() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; - float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx); + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; + float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl index 876815f277..d8c267f60a 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.glsl @@ -3,11 +3,11 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0)); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1)); } vec4 vertex_main() { @@ -29,11 +29,11 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0)); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1)); } void fragment_main() { @@ -49,11 +49,11 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_7cd6de() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0)); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl index b8f980b914..00d9c116fa 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.msl @@ -2,11 +2,11 @@ using namespace metal; void textureSampleGrad_7cd6de(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; - float2 arg_4 = float2(0.0f); - float2 arg_5 = float2(0.0f); - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(0)); + float2 arg_4 = float2(1.0f); + float2 arg_5 = float2(1.0f); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm index 174acb50c9..c44f828283 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 63 +; Bound: 65 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -47,65 +47,67 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %46 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %49 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %49 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %52 = OpTypeFunction %v4float %textureSampleGrad_7cd6de = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_v2float Function %20 - %arg_5 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_v2float Function %24 + %arg_5 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - OpStore %arg_4 %20 - OpStore %arg_5 %20 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_3 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %42 = OpLoad %v2float %arg_4 - %43 = OpLoad %v2float %arg_5 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad|ConstOffset %42 %43 %46 - OpStore %res %30 + OpStore %arg_4 %21 + OpStore %arg_5 %21 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %v2float %arg_4 + %45 = OpLoad %v2float %arg_5 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad|ConstOffset %44 %45 %49 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %49 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleGrad_7cd6de +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %55 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleGrad_7cd6de + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %61 = OpLabel - %62 = OpFunctionCall %void %textureSampleGrad_7cd6de + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleGrad_7cd6de OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl index 96e7b81b97..ecdd7466d6 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/7cd6de.wgsl.expected.wgsl @@ -3,11 +3,11 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_7cd6de() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; - var arg_4 = vec2(); - var arg_5 = vec2(); - const arg_6 = vec2(); + var arg_4 = vec2(1.0f); + var arg_5 = vec2(1.0f); + const arg_6 = vec2(1i); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl index b741911e42..4ece9199aa 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl @@ -25,10 +25,10 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, ddx: vec2, ddy: vec2) -> vec4 fn textureSampleGrad_a09131() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; - var arg_4 = vec2(); - var arg_5 = vec2(); + var arg_4 = vec2(1.f); + var arg_5 = vec2(1.f); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl index 408ec2f0e7..b77b05fb0c 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_a09131() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl index 408ec2f0e7..b77b05fb0c 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_a09131() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl index ce8038c3c6..931674d917 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5); } @@ -29,10 +29,10 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5); } @@ -49,10 +49,10 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_a09131() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); vec4 res = textureGrad(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl index 1065f838b3..54fa329892 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleGrad_a09131(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; - float2 arg_4 = float2(0.0f); - float2 arg_5 = float2(0.0f); + float2 arg_4 = float2(1.0f); + float2 arg_5 = float2(1.0f); float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5)); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm index 031b5d1538..013b89933d 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -47,62 +47,63 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleGrad_a09131 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_v2float Function %20 - %arg_5 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_v2float Function %24 + %arg_5 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - OpStore %arg_4 %20 - OpStore %arg_5 %20 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_3 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %42 = OpLoad %v2float %arg_4 - %43 = OpLoad %v2float %arg_5 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43 - OpStore %res %30 + OpStore %arg_4 %21 + OpStore %arg_5 %21 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %v2float %arg_4 + %45 = OpLoad %v2float %arg_5 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleGrad_a09131 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleGrad_a09131 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleGrad_a09131 + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleGrad_a09131 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl index b15bd3ac7b..c358991cec 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/a09131.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_a09131() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; - var arg_4 = vec2(); - var arg_5 = vec2(); + var arg_4 = vec2(1.0f); + var arg_5 = vec2(1.0f); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl index 0df48a1092..911b398e29 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl @@ -25,10 +25,10 @@ // fn textureSampleGrad(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_bbb58f() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; - var arg_4 = vec3(); - var arg_5 = vec3(); + var arg_4 = vec3(1.f); + var arg_5 = vec3(1.f); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl index da308d643a..fbe11fcc8b 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_bbb58f() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; - float3 arg_4 = (0.0f).xxx; - float3 arg_5 = (0.0f).xxx; + float3 arg_4 = (1.0f).xxx; + float3 arg_5 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl index da308d643a..fbe11fcc8b 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_bbb58f() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; - float3 arg_4 = (0.0f).xxx; - float3 arg_5 = (0.0f).xxx; + float3 arg_4 = (1.0f).xxx; + float3 arg_5 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl index 53879d7ab6..ec2e05e1c7 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleGrad_bbb58f(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; - float3 arg_4 = float3(0.0f); - float3 arg_5 = float3(0.0f); + float3 arg_4 = float3(1.0f); + float3 arg_5 = float3(1.0f); float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradientcube(arg_4, arg_5)); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm index 4905a93041..f95babe5e6 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -48,62 +48,63 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %35 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleGrad_bbb58f = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_v3float Function %20 - %arg_5 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_v3float Function %24 + %arg_5 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - OpStore %arg_4 %20 - OpStore %arg_5 %20 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_2 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %uint %arg_3 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %42 = OpLoad %v3float %arg_4 - %43 = OpLoad %v3float %arg_5 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43 - OpStore %res %30 + OpStore %arg_4 %21 + OpStore %arg_5 %21 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %v3float %arg_4 + %45 = OpLoad %v3float %arg_5 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleGrad_bbb58f +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleGrad_bbb58f + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleGrad_bbb58f + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleGrad_bbb58f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl index 2419db82ea..e05c270b80 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/bbb58f.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_bbb58f() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; - var arg_4 = vec3(); - var arg_5 = vec3(); + var arg_4 = vec3(1.0f); + var arg_5 = vec3(1.0f); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl index d612765769..2fc3391cf4 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl @@ -25,10 +25,10 @@ // fn textureSampleGrad(texture: texture_2d, sampler: sampler, coords: vec2, ddx: vec2, ddy: vec2, @const offset: vec2) -> vec4 fn textureSampleGrad_d4e3c5() { - var arg_2 = vec2(); - var arg_3 = vec2(); - var arg_4 = vec2(); - const arg_5 = vec2(); + var arg_2 = vec2(1.f); + var arg_3 = vec2(1.f); + var arg_4 = vec2(1.f); + const arg_5 = vec2(1i); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl index 203eca8fb1..411191fcd8 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d4e3c5() { - float2 arg_2 = (0.0f).xx; - float2 arg_3 = (0.0f).xx; - float2 arg_4 = (0.0f).xx; - float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xx); + float2 arg_2 = (1.0f).xx; + float2 arg_3 = (1.0f).xx; + float2 arg_4 = (1.0f).xx; + float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl index 203eca8fb1..411191fcd8 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d4e3c5() { - float2 arg_2 = (0.0f).xx; - float2 arg_3 = (0.0f).xx; - float2 arg_4 = (0.0f).xx; - float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (0).xx); + float2 arg_2 = (1.0f).xx; + float2 arg_3 = (1.0f).xx; + float2 arg_4 = (1.0f).xx; + float4 res = arg_0.SampleGrad(arg_1, arg_2, arg_3, arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl index a772706f45..fbc2291ec3 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec2 arg_2 = vec2(0.0f); - vec2 arg_3 = vec2(0.0f); - vec2 arg_4 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(0)); + vec2 arg_2 = vec2(1.0f); + vec2 arg_3 = vec2(1.0f); + vec2 arg_4 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(1)); } vec4 vertex_main() { @@ -28,10 +28,10 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec2 arg_2 = vec2(0.0f); - vec2 arg_3 = vec2(0.0f); - vec2 arg_4 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(0)); + vec2 arg_2 = vec2(1.0f); + vec2 arg_3 = vec2(1.0f); + vec2 arg_4 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(1)); } void fragment_main() { @@ -47,10 +47,10 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleGrad_d4e3c5() { - vec2 arg_2 = vec2(0.0f); - vec2 arg_3 = vec2(0.0f); - vec2 arg_4 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(0)); + vec2 arg_2 = vec2(1.0f); + vec2 arg_3 = vec2(1.0f); + vec2 arg_4 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, arg_2, arg_3, arg_4, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl index 166bab5879..8a6867e430 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleGrad_d4e3c5(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); - float2 arg_3 = float2(0.0f); - float2 arg_4 = float2(0.0f); - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient2d(arg_3, arg_4), int2(0)); + float2 arg_2 = float2(1.0f); + float2 arg_3 = float2(1.0f); + float2 arg_4 = float2(1.0f); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, gradient2d(arg_3, arg_4), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm index 817905adcf..08693fffb5 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,53 +46,55 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float - %28 = OpTypeSampledImage %11 + %24 = OpConstantNull %v2float + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %38 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureSampleGrad_d4e3c5 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_v2float Function %20 - %arg_4 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_v2float Function %24 + %arg_4 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 - OpStore %arg_3 %20 - OpStore %arg_4 %20 - %26 = OpLoad %14 %arg_1 - %27 = OpLoad %11 %arg_0 - %29 = OpSampledImage %28 %27 %26 - %30 = OpLoad %v2float %arg_2 - %31 = OpLoad %v2float %arg_3 - %32 = OpLoad %v2float %arg_4 - %25 = OpImageSampleExplicitLod %v4float %29 %30 Grad|ConstOffset %31 %32 %35 - OpStore %res %25 + OpStore %arg_2 %21 + OpStore %arg_3 %21 + OpStore %arg_4 %21 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %v2float %arg_3 + %34 = OpLoad %v2float %arg_4 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Grad|ConstOffset %33 %34 %38 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleGrad_d4e3c5 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %void %textureSampleGrad_d4e3c5 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleGrad_d4e3c5 + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleGrad_d4e3c5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl index 47a0090edf..8989eb7710 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d4e3c5.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_d4e3c5() { - var arg_2 = vec2(); - var arg_3 = vec2(); - var arg_4 = vec2(); - const arg_5 = vec2(); + var arg_2 = vec2(1.0f); + var arg_3 = vec2(1.0f); + var arg_4 = vec2(1.0f); + const arg_5 = vec2(1i); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl index 165faad669..f198c4e864 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl @@ -25,11 +25,11 @@ // fn textureSampleGrad(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, ddx: vec2, ddy: vec2, @const offset: vec2) -> vec4 fn textureSampleGrad_d65515() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; - var arg_4 = vec2(); - var arg_5 = vec2(); - const arg_6 = vec2(); + var arg_4 = vec2(1.f); + var arg_5 = vec2(1.f); + const arg_6 = vec2(1i); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl index 91e62c1e3a..62d6d63c82 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.dxc.hlsl @@ -2,11 +2,11 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d65515() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; - float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx); + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; + float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl index 91e62c1e3a..62d6d63c82 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.fxc.hlsl @@ -2,11 +2,11 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_d65515() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float2 arg_4 = (0.0f).xx; - float2 arg_5 = (0.0f).xx; - float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (0).xx); + float2 arg_4 = (1.0f).xx; + float2 arg_5 = (1.0f).xx; + float4 res = arg_0.SampleGrad(arg_1, float3(arg_2, float(arg_3)), arg_4, arg_5, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl index 31c47a2771..8c93957d65 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.glsl @@ -3,11 +3,11 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0)); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1)); } vec4 vertex_main() { @@ -29,11 +29,11 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0)); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1)); } void fragment_main() { @@ -49,11 +49,11 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleGrad_d65515() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - vec2 arg_4 = vec2(0.0f); - vec2 arg_5 = vec2(0.0f); - vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(0)); + vec2 arg_4 = vec2(1.0f); + vec2 arg_5 = vec2(1.0f); + vec4 res = textureGradOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, arg_5, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl index ad234a07d2..cf94801672 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.msl @@ -2,11 +2,11 @@ using namespace metal; void textureSampleGrad_d65515(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; - float2 arg_4 = float2(0.0f); - float2 arg_5 = float2(0.0f); - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(0)); + float2 arg_4 = float2(1.0f); + float2 arg_5 = float2(1.0f); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradient2d(arg_4, arg_5), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm index 274c793254..f99de76ea4 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -47,64 +47,65 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %45 = OpConstantNull %v2int + %47 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %48 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %50 = OpTypeFunction %v4float %textureSampleGrad_d65515 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_v2float Function %20 - %arg_5 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_v2float Function %24 + %arg_5 = OpVariable %_ptr_Function_v2float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - OpStore %arg_4 %20 - OpStore %arg_5 %20 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_3 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %42 = OpLoad %v2float %arg_4 - %43 = OpLoad %v2float %arg_5 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad|ConstOffset %42 %43 %45 - OpStore %res %30 + OpStore %arg_4 %21 + OpStore %arg_5 %21 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %v2float %arg_4 + %45 = OpLoad %v2float %arg_5 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad|ConstOffset %44 %45 %47 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleGrad_d65515 +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleGrad_d65515 + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %60 = OpLabel - %61 = OpFunctionCall %void %textureSampleGrad_d65515 + %61 = OpLabel + %62 = OpFunctionCall %void %textureSampleGrad_d65515 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl index 1397fcf78e..30244fd0b5 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/d65515.wgsl.expected.wgsl @@ -3,11 +3,11 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_d65515() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; - var arg_4 = vec2(); - var arg_5 = vec2(); - const arg_6 = vec2(); + var arg_4 = vec2(1.0f); + var arg_5 = vec2(1.0f); + const arg_6 = vec2(1i); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl index ff1e7cf33d..9100f4dff1 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl @@ -25,10 +25,10 @@ // fn textureSampleGrad(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, ddx: vec3, ddy: vec3) -> vec4 fn textureSampleGrad_e383db() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; - var arg_4 = vec3(); - var arg_5 = vec3(); + var arg_4 = vec3(1.f); + var arg_5 = vec3(1.f); var res: vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl index 1f111fbf1a..bb27c4d679 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_e383db() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; - float3 arg_4 = (0.0f).xxx; - float3 arg_5 = (0.0f).xxx; + float3 arg_4 = (1.0f).xxx; + float3 arg_5 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl index 1f111fbf1a..bb27c4d679 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleGrad_e383db() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; - float3 arg_4 = (0.0f).xxx; - float3 arg_5 = (0.0f).xxx; + float3 arg_4 = (1.0f).xxx; + float3 arg_5 = (1.0f).xxx; float4 res = arg_0.SampleGrad(arg_1, float4(arg_2, float(arg_3)), arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl index e452422810..dcd580675a 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleGrad_e383db(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; - float3 arg_4 = float3(0.0f); - float3 arg_5 = float3(0.0f); + float3 arg_4 = float3(1.0f); + float3 arg_5 = float3(1.0f); float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, gradientcube(arg_4, arg_5)); } diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm index b63df46741..206ee79316 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -48,62 +48,63 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %35 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleGrad_e383db = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_v3float Function %20 - %arg_5 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_v3float Function %24 + %arg_5 = OpVariable %_ptr_Function_v3float Function %24 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - OpStore %arg_4 %20 - OpStore %arg_5 %20 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_2 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %int %arg_3 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %42 = OpLoad %v3float %arg_4 - %43 = OpLoad %v3float %arg_5 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Grad %42 %43 - OpStore %res %30 + OpStore %arg_4 %21 + OpStore %arg_5 %21 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %v3float %arg_4 + %45 = OpLoad %v3float %arg_5 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Grad %44 %45 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleGrad_e383db +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleGrad_e383db OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleGrad_e383db + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleGrad_e383db OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleGrad_e383db + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleGrad_e383db OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl index 792b22d33e..e4f9c71558 100644 --- a/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleGrad/e383db.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleGrad_e383db() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; - var arg_4 = vec3(); - var arg_5 = vec3(); + var arg_4 = vec3(1.0f); + var arg_5 = vec3(1.0f); var res : vec4 = textureSampleGrad(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl index 5b14236c4e..cf57717a81 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: i32) -> f32 fn textureSampleLevel_02be59() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl index d3cce44a95..ce6b9cd1b3 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_02be59() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl index d3cce44a95..ce6b9cd1b3 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_02be59() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl index b24ee0b4f1..ecada9c7b8 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3)); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_02be59() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.msl index a3aee72ab2..d40c8b3323 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_02be59(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm index 4d6810dd01..2a9f874582 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,53 +45,54 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %32 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %34 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %39 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureSampleLevel_02be59 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - %30 = OpLoad %14 %arg_1 - %31 = OpLoad %11 %arg_0 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v2float %arg_2 - %36 = OpLoad %int %arg_3 - %35 = OpConvertSToF %float %36 - %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35 - %28 = OpCompositeExtract %float %29 0 - OpStore %res %28 + %32 = OpLoad %14 %arg_1 + %33 = OpLoad %11 %arg_0 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v2float %arg_2 + %38 = OpLoad %int %arg_3 + %37 = OpConvertSToF %float %38 + %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37 + %30 = OpCompositeExtract %float %31 0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_02be59 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleLevel_02be59 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_02be59 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_02be59 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleLevel_02be59 + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleLevel_02be59 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl index cab9d7336a..3596bc5d3b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/02be59.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_02be59() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl index 2a9a9c7fc1..6755159621 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl @@ -25,9 +25,9 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_0b0a1b() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl index d57bb5e533..905839cdf0 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0b0a1b() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl index d57bb5e533..905839cdf0 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0b0a1b() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl index 156234643e..07d5757658 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_0b0a1b() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl index 5aec41a85d..8f75c79354 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleLevel_0b0a1b(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.spvasm index 128e2c99f0..aeac66282d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,51 +45,53 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %35 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %textureSampleLevel_0b0a1b = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v2float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod|ConstOffset %32 %35 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod|ConstOffset %33 %37 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_0b0a1b +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_0b0a1b + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureSampleLevel_0b0a1b + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_0b0a1b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl index cfa94cf973..2ec980aad3 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0b0a1b.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_0b0a1b() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl index a7858f0cc4..b02c9c6c5c 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_0bdd9a() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl index fd1c612315..a8e6b4960f 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0bdd9a() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl index fd1c612315..a8e6b4960f 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_0bdd9a() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.msl index 1a157e0443..8a29dcc80f 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_0bdd9a(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm index 31adb35595..c8663d9961 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,60 +47,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleLevel_0bdd9a = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %36 = OpLoad %v3float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %39 = OpCompositeExtract %float %36 2 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_0bdd9a +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleLevel_0bdd9a + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleLevel_0bdd9a + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleLevel_0bdd9a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl index 554139b3b2..c3d8c933e7 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/0bdd9a.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_0bdd9a() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl index 9717bef6d4..51222b026b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3, level: i32) -> f32 fn textureSampleLevel_1b0291() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl index 4126c9395f..b4f563f584 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1b0291() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl index 4126c9395f..b4f563f584 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1b0291() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.msl index 780a19c39e..0aeb5a18c5 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_1b0291(depthcube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm index 0ce435496e..97476be567 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,53 +45,54 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %32 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %34 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %39 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureSampleLevel_1b0291 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - %30 = OpLoad %14 %arg_1 - %31 = OpLoad %11 %arg_0 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v3float %arg_2 - %36 = OpLoad %int %arg_3 - %35 = OpConvertSToF %float %36 - %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35 - %28 = OpCompositeExtract %float %29 0 - OpStore %res %28 + %32 = OpLoad %14 %arg_1 + %33 = OpLoad %11 %arg_0 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v3float %arg_2 + %38 = OpLoad %int %arg_3 + %37 = OpConvertSToF %float %38 + %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37 + %30 = OpCompositeExtract %float %31 0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_1b0291 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleLevel_1b0291 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_1b0291 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_1b0291 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleLevel_1b0291 + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleLevel_1b0291 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl index 979eb5587b..859e5f4a4c 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1b0291.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1b0291() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl index 1807e7f16a..4f106f7a64 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: i32) -> f32 fn textureSampleLevel_1bf73e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1i; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl index 745e6944a7..aebf22de55 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1bf73e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl index 745e6944a7..aebf22de55 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_1bf73e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.msl index f6e0ca14f8..86811a404a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_1bf73e(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; int arg_4 = 1; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm index 8bc65591c1..2ac3b755aa 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,61 +46,62 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_float = OpTypePointer Function %float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleLevel_1bf73e = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %int_1 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_3 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %43 = OpLoad %int %arg_4 - %42 = OpConvertSToF %float %43 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42 - %29 = OpCompositeExtract %float %30 0 - OpStore %res %29 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %45 = OpLoad %int %arg_4 + %44 = OpConvertSToF %float %45 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_1bf73e +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleLevel_1bf73e + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleLevel_1bf73e + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleLevel_1bf73e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl index 82a8adc380..f286a51c50 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/1bf73e.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_1bf73e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1i; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl index 20ae0d8d6e..0ad52fb97c 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: f32) -> vec4 fn textureSampleLevel_265cc7() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl index b5bdc03a24..ad30972b80 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_265cc7() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl index b5bdc03a24..ad30972b80 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_265cc7() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl index e6ee969126..0d6741f5d5 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -28,7 +28,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -47,7 +47,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_265cc7() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl index 87765ee624..81fc96a11e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_265cc7(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm index 1c0eae9afe..dfbca6aef1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleLevel_265cc7 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_265cc7 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleLevel_265cc7 + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleLevel_265cc7 + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleLevel_265cc7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl index d46530bc3c..44e2223f7b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/265cc7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_265cc7() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl index afaddb56a1..3112aeff64 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: u32) -> f32 fn textureSampleLevel_2974eb() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1u; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl index 22626f80c4..21e3ab2380 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_2974eb() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl index 22626f80c4..21e3ab2380 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_2974eb() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.msl index 8c3cf62d68..c665c33719 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_2974eb(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; uint arg_4 = 1u; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.spvasm index 05d6dc564e..0262bb6aa7 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 64 +; Bound: 65 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,65 +46,66 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %32 = OpConstantNull %uint - %37 = OpTypeSampledImage %11 + %34 = OpConstantNull %uint + %39 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_float = OpTypePointer Function %float - %50 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %52 = OpTypeFunction %v4float %textureSampleLevel_2974eb = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_uint Function %32 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_uint Function %34 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %uint_1 - %35 = OpLoad %14 %arg_1 - %36 = OpLoad %11 %arg_0 - %38 = OpSampledImage %37 %36 %35 - %40 = OpLoad %v2float %arg_2 - %41 = OpCompositeExtract %float %40 0 - %42 = OpCompositeExtract %float %40 1 - %44 = OpLoad %int %arg_3 - %43 = OpConvertSToF %float %44 - %45 = OpCompositeConstruct %v3float %41 %42 %43 - %47 = OpLoad %uint %arg_4 - %46 = OpConvertSToF %float %47 - %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46 - %33 = OpCompositeExtract %float %34 0 - OpStore %res %33 + %37 = OpLoad %14 %arg_1 + %38 = OpLoad %11 %arg_0 + %40 = OpSampledImage %39 %38 %37 + %42 = OpLoad %v2float %arg_2 + %43 = OpCompositeExtract %float %42 0 + %44 = OpCompositeExtract %float %42 1 + %46 = OpLoad %int %arg_3 + %45 = OpConvertSToF %float %46 + %47 = OpCompositeConstruct %v3float %43 %44 %45 + %49 = OpLoad %uint %arg_4 + %48 = OpConvertSToF %float %49 + %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48 + %35 = OpCompositeExtract %float %36 0 + OpStore %res %35 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %50 - %52 = OpLabel - %53 = OpFunctionCall %void %textureSampleLevel_2974eb +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %56 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleLevel_2974eb + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %62 = OpLabel - %63 = OpFunctionCall %void %textureSampleLevel_2974eb + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleLevel_2974eb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl index 3d501eadd2..5785bac211 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/2974eb.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_2974eb() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1u; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl index f7a6b3ba44..5d4fa184d9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32) -> vec4 fn textureSampleLevel_302be4() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl index 997a9e9d52..349d78a195 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_302be4() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl index 997a9e9d52..349d78a195 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_302be4() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl index faded30067..c808922d06 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -28,7 +28,7 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); @@ -47,7 +47,7 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_302be4() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; vec4 res = textureLod(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.msl index ec288702ac..3e68abc54f 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_302be4(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm index bebc87fe92..4f760f9b27 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,60 +46,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleLevel_302be4 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_302be4 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleLevel_302be4 + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleLevel_302be4 + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleLevel_302be4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl index 00560c0584..d70cb895f6 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/302be4.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_302be4() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl index ea0e79fd00..109df303ae 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl @@ -25,10 +25,10 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: i32, @const offset: vec2) -> f32 fn textureSampleLevel_36780e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl index f746f37a19..631b705c95 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36780e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; int arg_4 = 1; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl index f746f37a19..631b705c95 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36780e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; int arg_4 = 1; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl index 8f316691b9..53ffa0d64e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleLevel_36780e(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; int arg_4 = 1; - float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm index 284fa7403e..4e64bdde02 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 63 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,63 +46,64 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %45 = OpConstantNull %v2int + %47 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %48 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %50 = OpTypeFunction %v4float %textureSampleLevel_36780e = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %int_1 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %int %arg_3 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %43 = OpLoad %int %arg_4 - %42 = OpConvertSToF %float %43 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod|ConstOffset %42 %45 - %29 = OpCompositeExtract %float %30 0 - OpStore %res %29 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %45 = OpLoad %int %arg_4 + %44 = OpConvertSToF %float %45 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %47 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleLevel_36780e +%vertex_main_inner = OpFunction %v4float None %50 + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleLevel_36780e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %55 = OpLabel + %56 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %56 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleLevel_36780e + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleLevel_36780e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %60 = OpLabel - %61 = OpFunctionCall %void %textureSampleLevel_36780e + %61 = OpLabel + %62 = OpFunctionCall %void %textureSampleLevel_36780e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl index e299691ae7..efa2a14d61 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36780e.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_36780e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl index c03589dd71..d9222e8e44 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl @@ -25,10 +25,10 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: u32, @const offset: vec2) -> f32 fn textureSampleLevel_36f0d3() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl index 15d3909863..8959ed26de 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36f0d3() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; uint arg_4 = 1u; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl index 15d3909863..8959ed26de 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_36f0d3() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; uint arg_4 = 1u; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl index 253a816128..f7c22f2b1c 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleLevel_36f0d3(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; uint arg_4 = 1u; - float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm index c672f1846b..612754f062 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 66 +; Bound: 67 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,67 +46,68 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %32 = OpConstantNull %uint - %37 = OpTypeSampledImage %11 + %34 = OpConstantNull %uint + %39 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %49 = OpConstantNull %v2int + %51 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %52 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %54 = OpTypeFunction %v4float %textureSampleLevel_36f0d3 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_uint Function %32 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_uint Function %34 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %uint_1 - %35 = OpLoad %14 %arg_1 - %36 = OpLoad %11 %arg_0 - %38 = OpSampledImage %37 %36 %35 - %40 = OpLoad %v2float %arg_2 - %41 = OpCompositeExtract %float %40 0 - %42 = OpCompositeExtract %float %40 1 - %44 = OpLoad %int %arg_3 - %43 = OpConvertSToF %float %44 - %45 = OpCompositeConstruct %v3float %41 %42 %43 - %47 = OpLoad %uint %arg_4 - %46 = OpConvertSToF %float %47 - %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod|ConstOffset %46 %49 - %33 = OpCompositeExtract %float %34 0 - OpStore %res %33 + %37 = OpLoad %14 %arg_1 + %38 = OpLoad %11 %arg_0 + %40 = OpSampledImage %39 %38 %37 + %42 = OpLoad %v2float %arg_2 + %43 = OpCompositeExtract %float %42 0 + %44 = OpCompositeExtract %float %42 1 + %46 = OpLoad %int %arg_3 + %45 = OpConvertSToF %float %46 + %47 = OpCompositeConstruct %v3float %43 %44 %45 + %49 = OpLoad %uint %arg_4 + %48 = OpConvertSToF %float %49 + %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod|ConstOffset %48 %51 + %35 = OpCompositeExtract %float %36 0 + OpStore %res %35 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %52 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleLevel_36f0d3 +%vertex_main_inner = OpFunction %v4float None %54 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %58 + %59 = OpLabel + %60 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %60 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %61 = OpLabel - %62 = OpFunctionCall %void %textureSampleLevel_36f0d3 + %62 = OpLabel + %63 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %64 = OpLabel - %65 = OpFunctionCall %void %textureSampleLevel_36f0d3 + %65 = OpLabel + %66 = OpFunctionCall %void %textureSampleLevel_36f0d3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl index 5812a97127..b7aa845802 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/36f0d3.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_36f0d3() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl index bca9bb703f..b971e4d8b3 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: i32) -> f32 fn textureSampleLevel_3c3442() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1i; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl index d26576d352..3865538040 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_3c3442() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl index d26576d352..3865538040 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_3c3442() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.msl index 35a4af2a92..93bd50c0ac 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_3c3442(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; int arg_4 = 1; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.spvasm index 764f96997d..1fa0e90423 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 64 +; Bound: 65 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,65 +46,66 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %32 = OpConstantNull %int - %37 = OpTypeSampledImage %11 + %34 = OpConstantNull %int + %39 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_float = OpTypePointer Function %float - %50 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %52 = OpTypeFunction %v4float %textureSampleLevel_3c3442 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_int Function %32 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_int Function %34 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %int_1 - %35 = OpLoad %14 %arg_1 - %36 = OpLoad %11 %arg_0 - %38 = OpSampledImage %37 %36 %35 - %40 = OpLoad %v2float %arg_2 - %41 = OpCompositeExtract %float %40 0 - %42 = OpCompositeExtract %float %40 1 - %44 = OpLoad %uint %arg_3 - %43 = OpConvertUToF %float %44 - %45 = OpCompositeConstruct %v3float %41 %42 %43 - %47 = OpLoad %int %arg_4 - %46 = OpConvertSToF %float %47 - %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46 - %33 = OpCompositeExtract %float %34 0 - OpStore %res %33 + %37 = OpLoad %14 %arg_1 + %38 = OpLoad %11 %arg_0 + %40 = OpSampledImage %39 %38 %37 + %42 = OpLoad %v2float %arg_2 + %43 = OpCompositeExtract %float %42 0 + %44 = OpCompositeExtract %float %42 1 + %46 = OpLoad %uint %arg_3 + %45 = OpConvertUToF %float %46 + %47 = OpCompositeConstruct %v3float %43 %44 %45 + %49 = OpLoad %int %arg_4 + %48 = OpConvertSToF %float %49 + %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48 + %35 = OpCompositeExtract %float %36 0 + OpStore %res %35 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %50 - %52 = OpLabel - %53 = OpFunctionCall %void %textureSampleLevel_3c3442 +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %56 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleLevel_3c3442 + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %62 = OpLabel - %63 = OpFunctionCall %void %textureSampleLevel_3c3442 + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleLevel_3c3442 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl index 2196df798f..0320df3718 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/3c3442.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_3c3442() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1i; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl index e158313a67..9a883752d2 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: u32) -> f32 fn textureSampleLevel_615583() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1u; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl index cbc17e91dc..a581ba21f0 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_615583() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl index cbc17e91dc..a581ba21f0 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_615583() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl index 34af000a7f..a162e3a693 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_615583(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; uint arg_4 = 1u; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm index 68e107db6f..6f3511f2e9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,61 +46,62 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %_ptr_Function_float = OpTypePointer Function %float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleLevel_615583 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %uint_1 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_3 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %43 = OpLoad %uint %arg_4 - %42 = OpConvertSToF %float %43 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42 - %29 = OpCompositeExtract %float %30 0 - OpStore %res %29 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %45 = OpLoad %uint %arg_4 + %44 = OpConvertSToF %float %45 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_615583 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_615583 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleLevel_615583 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleLevel_615583 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleLevel_615583 + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleLevel_615583 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl index 0c0d65dcdf..1c573ad511 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/615583.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_615583() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1u; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl index 077d173327..d5a1e7430a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: u32) -> f32 fn textureSampleLevel_73e892() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl index e381e9fd65..8e507edf4c 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_73e892() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl index e381e9fd65..8e507edf4c 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_73e892() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl index 14e1df9d66..d634058247 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3)); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3)); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_73e892() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float res = textureLod(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl index 4eb86fb999..fd1ebab8c0 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_73e892(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm index 1c0551a956..88bb69b94e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,53 +45,54 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %32 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %34 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %39 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureSampleLevel_73e892 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - %30 = OpLoad %14 %arg_1 - %31 = OpLoad %11 %arg_0 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v2float %arg_2 - %36 = OpLoad %uint %arg_3 - %35 = OpConvertSToF %float %36 - %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35 - %28 = OpCompositeExtract %float %29 0 - OpStore %res %28 + %32 = OpLoad %14 %arg_1 + %33 = OpLoad %11 %arg_0 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v2float %arg_2 + %38 = OpLoad %uint %arg_3 + %37 = OpConvertSToF %float %38 + %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37 + %30 = OpCompositeExtract %float %31 0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_73e892 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleLevel_73e892 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_73e892 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_73e892 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleLevel_73e892 + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleLevel_73e892 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl index 1d25212445..e61a548839 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/73e892.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_73e892() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl index f9bcd90e1f..cb1b048a05 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl @@ -25,9 +25,9 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: i32, @const offset: vec2) -> f32 fn textureSampleLevel_749baf() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl index 0431b6e12a..9e1020a65e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_749baf() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl index 0431b6e12a..9e1020a65e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_749baf() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; - float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl index e6a0500d2b..f2fbbd3e0a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_749baf() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; - float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl index 2802a73f21..dbd714dada 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleLevel_749baf(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; - float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm index 93494bd65c..2a9f5e2c8e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 55 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,55 +45,56 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %32 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %34 = OpTypeSampledImage %11 %v2int = OpTypeVector %int 2 - %38 = OpConstantNull %v2int + %40 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %41 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %43 = OpTypeFunction %v4float %textureSampleLevel_749baf = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 - %30 = OpLoad %14 %arg_1 - %31 = OpLoad %11 %arg_0 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v2float %arg_2 - %36 = OpLoad %int %arg_3 - %35 = OpConvertSToF %float %36 - %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod|ConstOffset %35 %38 - %28 = OpCompositeExtract %float %29 0 - OpStore %res %28 + %32 = OpLoad %14 %arg_1 + %33 = OpLoad %11 %arg_0 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v2float %arg_2 + %38 = OpLoad %int %arg_3 + %37 = OpConvertSToF %float %38 + %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod|ConstOffset %37 %40 + %30 = OpCompositeExtract %float %31 0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %41 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_749baf +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureSampleLevel_749baf OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %47 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleLevel_749baf + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_749baf OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %void %textureSampleLevel_749baf + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleLevel_749baf OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl index c9215b183b..80a39fb1d9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/749baf.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_749baf() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl index 0a8b7ad39e..13fd205a94 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32, level: u32) -> f32 fn textureSampleLevel_941a53() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var arg_4 = 1u; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl index ded6e21d75..1d07f98b15 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_941a53() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl index ded6e21d75..1d07f98b15 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_941a53() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl index 4bbcda9f98..17b58e68eb 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_941a53(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; uint arg_4 = 1u; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm index b6f33cec73..f7254586dc 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,61 +47,62 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %35 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleLevel_941a53 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %uint_1 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_2 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %uint %arg_3 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %43 = OpLoad %uint %arg_4 - %42 = OpConvertSToF %float %43 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42 - %29 = OpCompositeExtract %float %30 0 - OpStore %res %29 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %45 = OpLoad %uint %arg_4 + %44 = OpConvertSToF %float %45 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_941a53 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleLevel_941a53 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleLevel_941a53 + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleLevel_941a53 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl index 02a28c8d4e..118ea6388b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/941a53.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_941a53() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var arg_4 = 1u; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl index a54008b6df..2bcb61c223 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_external, sampler: sampler, coords: vec2) -> vec4 fn textureSampleLevel_979816() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl index 42293b9330..115d746118 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.dxc.hlsl @@ -85,7 +85,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleLevel_979816() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl index 42293b9330..115d746118 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.fxc.hlsl @@ -85,7 +85,7 @@ ExternalTextureParams tint_symbol_1(uint4 buffer[11], uint offset) { } void textureSampleLevel_979816() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float4 res = textureSampleExternal(arg_0, ext_tex_plane_1, arg_1, arg_2, tint_symbol_1(ext_tex_params, 0u)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl index 45fab1723e..6364e84c3b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.glsl @@ -54,7 +54,7 @@ vec4 textureSampleExternal(highp sampler2D plane0_smp, highp sampler2D plane1_sm uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner); } @@ -124,7 +124,7 @@ vec4 textureSampleExternal(highp sampler2D plane0_smp, highp sampler2D plane1_sm uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner); } @@ -188,7 +188,7 @@ vec4 textureSampleExternal(highp sampler2D plane0_smp, highp sampler2D plane1_sm uniform highp sampler2D arg_0_arg_1; uniform highp sampler2D ext_tex_plane_1_arg_1; void textureSampleLevel_979816() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); vec4 res = textureSampleExternal(arg_0_arg_1, ext_tex_plane_1_arg_1, arg_2, ext_tex_params.inner); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl index efa8279e17..c9d722eedf 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.msl @@ -62,7 +62,7 @@ float4 textureSampleExternal(texture2d plane0, texture2d< } void textureSampleLevel_979816(texture2d tint_symbol_1, texture2d tint_symbol_2, sampler tint_symbol_3, const constant ExternalTextureParams* const tint_symbol_4) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float4 res = textureSampleExternal(tint_symbol_1, tint_symbol_2, tint_symbol_3, arg_2, *(tint_symbol_4)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm index 4d772dc663..58d21300f4 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.spvasm @@ -5,7 +5,7 @@ builtins/gen/var/textureSampleLevel/979816.wgsl:29:24 warning: use of deprecated ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 147 +; Bound: 148 ; Schema: 0 OpCapability Shader %31 = OpExtInstImport "GLSL.std.450" @@ -124,12 +124,13 @@ builtins/gen/var/textureSampleLevel/979816.wgsl:29:24 warning: use of deprecated %98 = OpConstantNull %uint %void = OpTypeVoid %116 = OpTypeFunction %void - %120 = OpConstantNull %v2float + %120 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %123 = OpConstantNull %v2float %uint_0 = OpConstant %uint 0 %_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams %_ptr_Function_v4float = OpTypePointer Function %v4float - %134 = OpTypeFunction %v4float + %135 = OpTypeFunction %v4float %gammaCorrection = OpFunction %v3float None %25 %v = OpFunctionParameter %v3float %params = OpFunctionParameter %GammaTransferParams @@ -227,38 +228,38 @@ builtins/gen/var/textureSampleLevel/979816.wgsl:29:24 warning: use of deprecated OpFunctionEnd %textureSampleLevel_979816 = OpFunction %void None %116 %119 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %120 + %arg_2 = OpVariable %_ptr_Function_v2float Function %123 %res = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_2 %120 - %124 = OpLoad %11 %arg_0 - %125 = OpLoad %11 %ext_tex_plane_1 - %126 = OpLoad %24 %arg_1 - %127 = OpLoad %v2float %arg_2 - %130 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 - %131 = OpLoad %ExternalTextureParams %130 - %123 = OpFunctionCall %v4float %textureSampleExternal %124 %125 %126 %127 %131 - OpStore %res %123 + %125 = OpLoad %11 %arg_0 + %126 = OpLoad %11 %ext_tex_plane_1 + %127 = OpLoad %24 %arg_1 + %128 = OpLoad %v2float %arg_2 + %131 = OpAccessChain %_ptr_Uniform_ExternalTextureParams %ext_tex_params %uint_0 + %132 = OpLoad %ExternalTextureParams %131 + %124 = OpFunctionCall %v4float %textureSampleExternal %125 %126 %127 %128 %132 + OpStore %res %124 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %134 - %136 = OpLabel - %137 = OpFunctionCall %void %textureSampleLevel_979816 +%vertex_main_inner = OpFunction %v4float None %135 + %137 = OpLabel + %138 = OpFunctionCall %void %textureSampleLevel_979816 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %116 - %139 = OpLabel - %140 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %140 + %140 = OpLabel + %141 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %141 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %116 - %142 = OpLabel - %143 = OpFunctionCall %void %textureSampleLevel_979816 + %143 = OpLabel + %144 = OpFunctionCall %void %textureSampleLevel_979816 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %116 - %145 = OpLabel - %146 = OpFunctionCall %void %textureSampleLevel_979816 + %146 = OpLabel + %147 = OpFunctionCall %void %textureSampleLevel_979816 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl index 1b4da99331..ca58ef14d6 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/979816.wgsl.expected.wgsl @@ -7,7 +7,7 @@ builtins/gen/var/textureSampleLevel/979816.wgsl:29:24 warning: use of deprecated @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_979816() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl index 6a38486775..7d6e3ff54a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: u32) -> f32 fn textureSampleLevel_a12142() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var arg_4 = 1u; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl index 25a17d6929..87c53a0f29 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_a12142() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl index 25a17d6929..87c53a0f29 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_a12142() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; uint arg_4 = 1u; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.msl index e8b772e651..f3d6ea6ff7 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_a12142(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; uint arg_4 = 1u; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.spvasm index ebde5f0223..60fe8b6236 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 64 +; Bound: 65 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,65 +47,66 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int + %29 = OpConstantNull %int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %32 = OpConstantNull %uint - %37 = OpTypeSampledImage %11 + %34 = OpConstantNull %uint + %39 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %50 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %52 = OpTypeFunction %v4float %textureSampleLevel_a12142 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_uint Function %32 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_uint Function %34 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %uint_1 - %35 = OpLoad %14 %arg_1 - %36 = OpLoad %11 %arg_0 - %38 = OpSampledImage %37 %36 %35 - %39 = OpLoad %v3float %arg_2 - %40 = OpCompositeExtract %float %39 0 - %41 = OpCompositeExtract %float %39 1 - %42 = OpCompositeExtract %float %39 2 - %44 = OpLoad %int %arg_3 - %43 = OpConvertSToF %float %44 - %45 = OpCompositeConstruct %v4float %40 %41 %42 %43 - %47 = OpLoad %uint %arg_4 - %46 = OpConvertSToF %float %47 - %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46 - %33 = OpCompositeExtract %float %34 0 - OpStore %res %33 + %37 = OpLoad %14 %arg_1 + %38 = OpLoad %11 %arg_0 + %40 = OpSampledImage %39 %38 %37 + %41 = OpLoad %v3float %arg_2 + %42 = OpCompositeExtract %float %41 0 + %43 = OpCompositeExtract %float %41 1 + %44 = OpCompositeExtract %float %41 2 + %46 = OpLoad %int %arg_3 + %45 = OpConvertSToF %float %46 + %47 = OpCompositeConstruct %v4float %42 %43 %44 %45 + %49 = OpLoad %uint %arg_4 + %48 = OpConvertSToF %float %49 + %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48 + %35 = OpCompositeExtract %float %36 0 + OpStore %res %35 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %50 - %52 = OpLabel - %53 = OpFunctionCall %void %textureSampleLevel_a12142 +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %56 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleLevel_a12142 + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %62 = OpLabel - %63 = OpFunctionCall %void %textureSampleLevel_a12142 + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleLevel_a12142 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl index 4b06240fb2..be10276fc9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/a12142.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_a12142() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var arg_4 = 1u; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl index f562a0d782..7b91247592 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube_array, sampler: sampler, coords: vec3, array_index: u32, level: f32) -> vec4 fn textureSampleLevel_aab3b9() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var arg_4 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl index 481da2b48d..f11a31b296 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_aab3b9() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl index 481da2b48d..f11a31b296 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_aab3b9() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl index 44aa130fa0..24937304dc 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_aab3b9(texturecube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm index 155f61c924..b11e9f1144 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 59 +; Bound: 60 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,60 +47,61 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %46 = OpTypeFunction %v4float + %47 = OpTypeFunction %v4float %textureSampleLevel_aab3b9 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %36 = OpLoad %v3float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %39 = OpCompositeExtract %float %36 2 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v4float %37 %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod %43 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_aab3b9 +%vertex_main_inner = OpFunction %v4float None %47 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %52 = OpLabel + %53 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %53 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleLevel_aab3b9 + %55 = OpLabel + %56 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleLevel_aab3b9 + %58 = OpLabel + %59 = OpFunctionCall %void %textureSampleLevel_aab3b9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl index bfc675456a..3c0fb7f95e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/aab3b9.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_aab3b9() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl index 7d31330a60..a55b802544 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_abfcc0() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl index cabcb9012a..a9952cd940 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_abfcc0() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl index cabcb9012a..a9952cd940 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_abfcc0() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl index f94eaea51a..26e29dfb21 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_abfcc0() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.msl index 399820b91b..92c10641b9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_abfcc0(texture3d tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.spvasm index 46b9eb551b..4b754e7b13 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_abfcc0 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v3float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod %32 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod %33 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_abfcc0 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_abfcc0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_abfcc0 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_abfcc0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_abfcc0 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_abfcc0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl index 73e792178e..3d87e9717b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/abfcc0.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_abfcc0() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl index 890f04d2d9..e083760df4 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: i32, level: i32) -> f32 fn textureSampleLevel_ae5e39() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1i; var arg_4 = 1i; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl index 94ec7e47f1..ab9072b765 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae5e39() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl index 94ec7e47f1..ab9072b765 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae5e39() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; int arg_3 = 1; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.msl index baee28a478..ba65b1f2ed 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ae5e39(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); int arg_3 = 1; int arg_4 = 1; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm index 7046031fb9..2fcafc0f7b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 60 +; Bound: 61 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,61 +47,62 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %int + %35 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %46 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %48 = OpTypeFunction %v4float %textureSampleLevel_ae5e39 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 - %arg_4 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 + %arg_4 = OpVariable %_ptr_Function_int Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %int_1 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %35 = OpLoad %v3float %arg_2 - %36 = OpCompositeExtract %float %35 0 - %37 = OpCompositeExtract %float %35 1 - %38 = OpCompositeExtract %float %35 2 - %40 = OpLoad %int %arg_3 - %39 = OpConvertSToF %float %40 - %41 = OpCompositeConstruct %v4float %36 %37 %38 %39 - %43 = OpLoad %int %arg_4 - %42 = OpConvertSToF %float %43 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod %42 - %29 = OpCompositeExtract %float %30 0 - OpStore %res %29 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %37 = OpLoad %v3float %arg_2 + %38 = OpCompositeExtract %float %37 0 + %39 = OpCompositeExtract %float %37 1 + %40 = OpCompositeExtract %float %37 2 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v4float %38 %39 %40 %41 + %45 = OpLoad %int %arg_4 + %44 = OpConvertSToF %float %45 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod %44 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %46 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_ae5e39 +%vertex_main_inner = OpFunction %v4float None %48 + %50 = OpLabel + %51 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %52 + %53 = OpLabel + %54 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %54 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %void %textureSampleLevel_ae5e39 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleLevel_ae5e39 + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleLevel_ae5e39 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl index 64bd88bc01..b2ae0dac11 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae5e39.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ae5e39() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1i; var arg_4 = 1i; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl index e11d71fa54..ce45b30c89 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube, sampler: sampler, coords: vec3, level: u32) -> f32 fn textureSampleLevel_ae92a2() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl index 9e0a41a9e4..1b711c48e1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae92a2() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl index 9e0a41a9e4..1b711c48e1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ae92a2() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; float res = arg_0.SampleLevel(arg_1, arg_2, arg_3).x; } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl index d8dd6cefda..4c6aa453b3 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ae92a2(depthcube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm index 7d9df9a6e6..29bcc63143 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,53 +45,54 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %32 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %34 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %39 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %41 = OpTypeFunction %v4float %textureSampleLevel_ae92a2 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - %30 = OpLoad %14 %arg_1 - %31 = OpLoad %11 %arg_0 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v3float %arg_2 - %36 = OpLoad %uint %arg_3 - %35 = OpConvertSToF %float %36 - %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod %35 - %28 = OpCompositeExtract %float %29 0 - OpStore %res %28 + %32 = OpLoad %14 %arg_1 + %33 = OpLoad %11 %arg_0 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v3float %arg_2 + %38 = OpLoad %uint %arg_3 + %37 = OpConvertSToF %float %38 + %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod %37 + %30 = OpCompositeExtract %float %31 0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureSampleLevel_ae92a2 +%vertex_main_inner = OpFunction %v4float None %41 + %43 = OpLabel + %44 = OpFunctionCall %void %textureSampleLevel_ae92a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %46 = OpLabel + %47 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %47 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %48 = OpLabel - %49 = OpFunctionCall %void %textureSampleLevel_ae92a2 + %49 = OpLabel + %50 = OpFunctionCall %void %textureSampleLevel_ae92a2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleLevel_ae92a2 + %52 = OpLabel + %53 = OpFunctionCall %void %textureSampleLevel_ae92a2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl index b44c095cc8..6e70dbc954 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ae92a2.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ae92a2() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl index 3824a5510c..6763b94d52 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl @@ -25,10 +25,10 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: i32, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_b7c55c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1i; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl index df52dfd933..80efd9ff21 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_b7c55c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl index df52dfd933..80efd9ff21 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_b7c55c() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; int arg_3 = 1; float arg_4 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl index baad6220dd..4fda9590a5 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } vec4 vertex_main() { @@ -28,10 +28,10 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void fragment_main() { @@ -47,10 +47,10 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_b7c55c() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl index a1882e9488..4f18a1e711 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleLevel_b7c55c(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); int arg_3 = 1; float arg_4 = 1.0f; - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm index d7121f1b28..d46e0acc6b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 61 +; Bound: 62 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,62 +46,63 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %27 = OpConstantNull %int - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %int %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %45 = OpConstantNull %v2int + %46 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %48 = OpTypeFunction %v4float + %49 = OpTypeFunction %v4float %textureSampleLevel_b7c55c = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_int Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_int Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %int_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %int %arg_3 - %40 = OpConvertSToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod|ConstOffset %43 %45 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %int %arg_3 + %41 = OpConvertSToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %46 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %48 - %50 = OpLabel - %51 = OpFunctionCall %void %textureSampleLevel_b7c55c +%vertex_main_inner = OpFunction %v4float None %49 + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %53 = OpLabel - %54 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %54 + %54 = OpLabel + %55 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %55 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %56 = OpLabel - %57 = OpFunctionCall %void %textureSampleLevel_b7c55c + %57 = OpLabel + %58 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleLevel_b7c55c + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleLevel_b7c55c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl index cfd0309a7e..00db2de694 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/b7c55c.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_b7c55c() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1i; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl index 9339db55a1..2b59e7286a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_cube, sampler: sampler, coords: vec3, level: f32) -> vec4 fn textureSampleLevel_c32df7() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl index e5a4de66d2..825239f283 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c32df7() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl index e5a4de66d2..825239f283 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCube arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c32df7() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl index 91a2a08fdc..533331f9c5 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } @@ -45,7 +45,7 @@ void main() { uniform highp samplerCube arg_0_arg_1; void textureSampleLevel_c32df7() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.msl index aed75443b3..b08aa7d0ae 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_c32df7(texturecube tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.spvasm index a5cb38fd69..12dd55a7fc 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_c32df7 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v3float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod %32 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod %33 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_c32df7 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_c32df7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_c32df7 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_c32df7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_c32df7 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_c32df7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl index 46209393d4..475f975ab5 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c32df7.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c32df7() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl index 9c03fdcb85..20e1dda1b1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_2d, sampler: sampler, coords: vec2, level: f32) -> vec4 fn textureSampleLevel_c6aca6() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1.f; var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl index 812fee1354..e8d8bbafa1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c6aca6() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl index 812fee1354..e8d8bbafa1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_c6aca6() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; float arg_3 = 1.0f; float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl index 7784b1e309..8b40949a1d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.glsl @@ -3,7 +3,7 @@ uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } @@ -27,7 +27,7 @@ precision mediump float; uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } @@ -45,7 +45,7 @@ void main() { uniform highp sampler2D arg_0_arg_1; void textureSampleLevel_c6aca6() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); float arg_3 = 1.0f; vec4 res = textureLod(arg_0_arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.msl index 1f0f432365..074bcb0b75 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_c6aca6(texture2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); float arg_3 = 1.0f; float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3)); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.spvasm index f0f3069e9d..5e35948cf2 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 48 +; Bound: 49 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,48 +45,49 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float -%_ptr_Function_v2float = OpTypePointer Function %v2float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 +%_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %_ptr_Function_v4float = OpTypePointer Function %v4float - %35 = OpTypeFunction %v4float + %36 = OpTypeFunction %v4float %textureSampleLevel_c6aca6 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v2float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod %32 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v2float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod %33 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %35 - %37 = OpLabel - %38 = OpFunctionCall %void %textureSampleLevel_c6aca6 +%vertex_main_inner = OpFunction %v4float None %36 + %38 = OpLabel + %39 = OpFunctionCall %void %textureSampleLevel_c6aca6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %40 = OpLabel - %41 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %41 + %41 = OpLabel + %42 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %42 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %void %textureSampleLevel_c6aca6 + %44 = OpLabel + %45 = OpFunctionCall %void %textureSampleLevel_c6aca6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_c6aca6 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_c6aca6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl index 9fe9c9fb16..a7f1a9d05c 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/c6aca6.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_c6aca6() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1.0f; var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl index c4ea22ffa4..d3e1c5bd24 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl @@ -25,10 +25,10 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: u32, @const offset: vec2) -> f32 fn textureSampleLevel_cdfe0f() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl index 7b8c1920cf..d226209c75 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_cdfe0f() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; uint arg_4 = 1u; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl index 7b8c1920cf..d226209c75 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_cdfe0f() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; uint arg_4 = 1u; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl index a56b58cf62..b572e162b1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleLevel_cdfe0f(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; uint arg_4 = 1u; - float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm index 60850e569d..37ea8786c1 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 63 +; Bound: 65 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,64 +46,66 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %33 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %46 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %49 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %49 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %52 = OpTypeFunction %v4float %textureSampleLevel_cdfe0f = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %uint_1 - %31 = OpLoad %14 %arg_1 - %32 = OpLoad %11 %arg_0 - %34 = OpSampledImage %33 %32 %31 - %36 = OpLoad %v2float %arg_2 - %37 = OpCompositeExtract %float %36 0 - %38 = OpCompositeExtract %float %36 1 - %40 = OpLoad %uint %arg_3 - %39 = OpConvertUToF %float %40 - %41 = OpCompositeConstruct %v3float %37 %38 %39 - %43 = OpLoad %uint %arg_4 - %42 = OpConvertSToF %float %43 - %30 = OpImageSampleExplicitLod %v4float %34 %41 Lod|ConstOffset %42 %46 - %29 = OpCompositeExtract %float %30 0 - OpStore %res %29 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %45 = OpLoad %uint %arg_4 + %44 = OpConvertSToF %float %45 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %49 + %31 = OpCompositeExtract %float %32 0 + OpStore %res %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %49 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleLevel_cdfe0f +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %55 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %58 = OpLabel - %59 = OpFunctionCall %void %textureSampleLevel_cdfe0f + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %61 = OpLabel - %62 = OpFunctionCall %void %textureSampleLevel_cdfe0f + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleLevel_cdfe0f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl index c8353212c9..9332bbe7fc 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/cdfe0f.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_cdfe0f() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1u; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl index 288aa58e9b..611aa365cb 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl @@ -25,9 +25,9 @@ // fn textureSampleLevel(texture: texture_3d, sampler: sampler, coords: vec3, level: f32, @const offset: vec3) -> vec4 fn textureSampleLevel_dcbecb() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1.f; - const arg_4 = vec3(); + const arg_4 = vec3(1i); var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl index 1c3bad7651..2da8cf627b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_dcbecb() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xxx); + float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl index 1c3bad7651..2da8cf627b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture3D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_dcbecb() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; float arg_3 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xxx); + float4 res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xxx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl index 3875ed6679..e0c5e7e27b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler3D arg_0_arg_1; void textureSampleLevel_dcbecb() { - vec3 arg_2 = vec3(0.0f); + vec3 arg_2 = vec3(1.0f); float arg_3 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(0)); + vec4 res = textureLodOffset(arg_0_arg_1, arg_2, arg_3, ivec3(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl index 9068307c0c..5512f6a866 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleLevel_dcbecb(texture3d tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); float arg_3 = 1.0f; - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int3(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int3(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.spvasm index 59538e76a6..f3ec385c70 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 51 +; Bound: 53 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,51 +45,53 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float -%_ptr_Function_v3float = OpTypePointer Function %v3float %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 +%_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %_ptr_Function_float = OpTypePointer Function %float - %29 = OpTypeSampledImage %11 + %30 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %35 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %37 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %textureSampleLevel_dcbecb = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 %arg_3 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %float_1 - %27 = OpLoad %14 %arg_1 - %28 = OpLoad %11 %arg_0 - %30 = OpSampledImage %29 %28 %27 - %31 = OpLoad %v3float %arg_2 - %32 = OpLoad %float %arg_3 - %26 = OpImageSampleExplicitLod %v4float %30 %31 Lod|ConstOffset %32 %35 - OpStore %res %26 + %28 = OpLoad %14 %arg_1 + %29 = OpLoad %11 %arg_0 + %31 = OpSampledImage %30 %29 %28 + %32 = OpLoad %v3float %arg_2 + %33 = OpLoad %float %arg_3 + %27 = OpImageSampleExplicitLod %v4float %31 %32 Lod|ConstOffset %33 %37 + OpStore %res %27 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureSampleLevel_dcbecb +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %46 = OpLabel - %47 = OpFunctionCall %void %textureSampleLevel_dcbecb + %48 = OpLabel + %49 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %49 = OpLabel - %50 = OpFunctionCall %void %textureSampleLevel_dcbecb + %51 = OpLabel + %52 = OpFunctionCall %void %textureSampleLevel_dcbecb OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl index 0169878007..0bb95223cb 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/dcbecb.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_dcbecb() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1.0f; - const arg_4 = vec3(); + const arg_4 = vec3(1i); var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl index 284904ff12..4aa665006a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl @@ -25,10 +25,10 @@ // fn textureSampleLevel(texture: texture_depth_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: i32, @const offset: vec2) -> f32 fn textureSampleLevel_e6ce9e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl index 416f7c1cec..b836f82c99 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_e6ce9e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; int arg_4 = 1; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl index 416f7c1cec..b836f82c99 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_e6ce9e() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; int arg_4 = 1; - float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl index d4cb9c0f28..222b2c3bda 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleLevel_e6ce9e(depth2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; int arg_4 = 1; - float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm index 55a16bdd16..ea6785bf1e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 66 +; Bound: 67 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,67 +46,68 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %32 = OpConstantNull %int - %37 = OpTypeSampledImage %11 + %34 = OpConstantNull %int + %39 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %v2int = OpTypeVector %int 2 - %49 = OpConstantNull %v2int + %51 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %52 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %54 = OpTypeFunction %v4float %textureSampleLevel_e6ce9e = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_int Function %32 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_int Function %34 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %int_1 - %35 = OpLoad %14 %arg_1 - %36 = OpLoad %11 %arg_0 - %38 = OpSampledImage %37 %36 %35 - %40 = OpLoad %v2float %arg_2 - %41 = OpCompositeExtract %float %40 0 - %42 = OpCompositeExtract %float %40 1 - %44 = OpLoad %uint %arg_3 - %43 = OpConvertUToF %float %44 - %45 = OpCompositeConstruct %v3float %41 %42 %43 - %47 = OpLoad %int %arg_4 - %46 = OpConvertSToF %float %47 - %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod|ConstOffset %46 %49 - %33 = OpCompositeExtract %float %34 0 - OpStore %res %33 + %37 = OpLoad %14 %arg_1 + %38 = OpLoad %11 %arg_0 + %40 = OpSampledImage %39 %38 %37 + %42 = OpLoad %v2float %arg_2 + %43 = OpCompositeExtract %float %42 0 + %44 = OpCompositeExtract %float %42 1 + %46 = OpLoad %uint %arg_3 + %45 = OpConvertUToF %float %46 + %47 = OpCompositeConstruct %v3float %43 %44 %45 + %49 = OpLoad %int %arg_4 + %48 = OpConvertSToF %float %49 + %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod|ConstOffset %48 %51 + %35 = OpCompositeExtract %float %36 0 + OpStore %res %35 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %52 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleLevel_e6ce9e +%vertex_main_inner = OpFunction %v4float None %54 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %58 + %59 = OpLabel + %60 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %60 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %61 = OpLabel - %62 = OpFunctionCall %void %textureSampleLevel_e6ce9e + %62 = OpLabel + %63 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %64 = OpLabel - %65 = OpFunctionCall %void %textureSampleLevel_e6ce9e + %65 = OpLabel + %66 = OpFunctionCall %void %textureSampleLevel_e6ce9e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl index c1ddb355e5..724e8e384b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/e6ce9e.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_e6ce9e() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1i; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl index 438cfbfd30..3392a3ea09 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl @@ -25,9 +25,9 @@ // fn textureSampleLevel(texture: texture_depth_2d, sampler: sampler, coords: vec2, level: u32, @const offset: vec2) -> f32 fn textureSampleLevel_f3b2c8() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl index 86d0fd61ac..84069c6b88 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.dxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_f3b2c8() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl index 86d0fd61ac..84069c6b88 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.fxc.hlsl @@ -2,9 +2,9 @@ Texture2D arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_f3b2c8() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; - float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (0).xx).x; + float res = arg_0.SampleLevel(arg_1, arg_2, arg_3, (1).xx).x; } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl index b75e321f92..c5343b9942 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.glsl @@ -3,9 +3,9 @@ uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1)); } vec4 vertex_main() { @@ -27,9 +27,9 @@ precision mediump float; uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1)); } void fragment_main() { @@ -45,9 +45,9 @@ void main() { uniform highp sampler2DShadow arg_0_arg_1; void textureSampleLevel_f3b2c8() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; - float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(0)); + float res = textureLodOffset(arg_0_arg_1, vec3(arg_2, 0.0f), float(arg_3), ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl index 71b03c8b4d..3be2b49a6d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureSampleLevel_f3b2c8(depth2d tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; - float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(0)); + float res = tint_symbol_1.sample(tint_symbol_2, arg_2, level(arg_3), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm index d36a678302..8d1303691b 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 56 +; Bound: 58 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -45,56 +45,58 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %32 = OpTypeSampledImage %11 + %29 = OpConstantNull %uint + %34 = OpTypeSampledImage %11 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %39 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %42 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_float = OpTypePointer Function %float - %42 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %45 = OpTypeFunction %v4float %textureSampleLevel_f3b2c8 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 - %30 = OpLoad %14 %arg_1 - %31 = OpLoad %11 %arg_0 - %33 = OpSampledImage %32 %31 %30 - %34 = OpLoad %v2float %arg_2 - %36 = OpLoad %uint %arg_3 - %35 = OpConvertSToF %float %36 - %29 = OpImageSampleExplicitLod %v4float %33 %34 Lod|ConstOffset %35 %39 - %28 = OpCompositeExtract %float %29 0 - OpStore %res %28 + %32 = OpLoad %14 %arg_1 + %33 = OpLoad %11 %arg_0 + %35 = OpSampledImage %34 %33 %32 + %36 = OpLoad %v2float %arg_2 + %38 = OpLoad %uint %arg_3 + %37 = OpConvertSToF %float %38 + %31 = OpImageSampleExplicitLod %v4float %35 %36 Lod|ConstOffset %37 %42 + %30 = OpCompositeExtract %float %31 0 + OpStore %res %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %42 - %44 = OpLabel - %45 = OpFunctionCall %void %textureSampleLevel_f3b2c8 +%vertex_main_inner = OpFunction %v4float None %45 + %47 = OpLabel + %48 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %47 = OpLabel - %48 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %48 + %50 = OpLabel + %51 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %51 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleLevel_f3b2c8 + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %void %textureSampleLevel_f3b2c8 + %56 = OpLabel + %57 = OpFunctionCall %void %textureSampleLevel_f3b2c8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl index 7f7484af3e..b8c2a9600a 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/f3b2c8.wgsl.expected.wgsl @@ -3,9 +3,9 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_f3b2c8() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; - const arg_4 = vec2(); + const arg_4 = vec2(1i); var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl index 45895776e1..711b6a6c07 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl @@ -25,10 +25,10 @@ // fn textureSampleLevel(texture: texture_2d_array, sampler: sampler, coords: vec2, array_index: u32, level: f32, @const offset: vec2) -> vec4 fn textureSampleLevel_faa6d7() { - var arg_2 = vec2(); + var arg_2 = vec2(1.f); var arg_3 = 1u; var arg_4 = 1.f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res: vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl index 9aa6734347..f6a9777c24 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.dxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_faa6d7() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl index 9aa6734347..f6a9777c24 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.fxc.hlsl @@ -2,10 +2,10 @@ Texture2DArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_faa6d7() { - float2 arg_2 = (0.0f).xx; + float2 arg_2 = (1.0f).xx; uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (0).xx); + float4 res = arg_0.SampleLevel(arg_1, float3(arg_2, float(arg_3)), arg_4, (1).xx); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl index 28b00f3257..cf4331e371 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.glsl @@ -3,10 +3,10 @@ uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } vec4 vertex_main() { @@ -28,10 +28,10 @@ precision mediump float; uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void fragment_main() { @@ -47,10 +47,10 @@ void main() { uniform highp sampler2DArray arg_0_arg_1; void textureSampleLevel_faa6d7() { - vec2 arg_2 = vec2(0.0f); + vec2 arg_2 = vec2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(0)); + vec4 res = textureLodOffset(arg_0_arg_1, vec3(arg_2, float(arg_3)), arg_4, ivec2(1)); } void compute_main() { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl index 04351fea4a..04ccb6efd7 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.msl @@ -2,10 +2,10 @@ using namespace metal; void textureSampleLevel_faa6d7(texture2d_array tint_symbol_1, sampler tint_symbol_2) { - float2 arg_2 = float2(0.0f); + float2 arg_2 = float2(1.0f); uint arg_3 = 1u; float arg_4 = 1.0f; - float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(0)); + float4 res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4), int2(1)); } struct tint_symbol { diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm index 4329382ad8..c43e66db24 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 62 +; Bound: 64 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -46,63 +46,65 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v2float = OpTypeVector %float 2 - %20 = OpConstantNull %v2float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v2float %float_1 %float_1 %_ptr_Function_v2float = OpTypePointer Function %v2float + %24 = OpConstantNull %v2float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint - %float_1 = OpConstant %float 1 + %29 = OpConstantNull %uint %_ptr_Function_float = OpTypePointer Function %float - %34 = OpTypeSampledImage %11 + %35 = OpTypeSampledImage %11 %v3float = OpTypeVector %float 3 %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %46 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %48 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v4float = OpTypePointer Function %v4float - %49 = OpTypeFunction %v4float + %51 = OpTypeFunction %v4float %textureSampleLevel_faa6d7 = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v2float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 + %arg_2 = OpVariable %_ptr_Function_v2float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 %arg_4 = OpVariable %_ptr_Function_float Function %8 %res = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %float_1 - %32 = OpLoad %14 %arg_1 - %33 = OpLoad %11 %arg_0 - %35 = OpSampledImage %34 %33 %32 - %37 = OpLoad %v2float %arg_2 - %38 = OpCompositeExtract %float %37 0 - %39 = OpCompositeExtract %float %37 1 - %41 = OpLoad %uint %arg_3 - %40 = OpConvertUToF %float %41 - %42 = OpCompositeConstruct %v3float %38 %39 %40 - %43 = OpLoad %float %arg_4 - %31 = OpImageSampleExplicitLod %v4float %35 %42 Lod|ConstOffset %43 %46 - OpStore %res %31 + %33 = OpLoad %14 %arg_1 + %34 = OpLoad %11 %arg_0 + %36 = OpSampledImage %35 %34 %33 + %38 = OpLoad %v2float %arg_2 + %39 = OpCompositeExtract %float %38 0 + %40 = OpCompositeExtract %float %38 1 + %42 = OpLoad %uint %arg_3 + %41 = OpConvertUToF %float %42 + %43 = OpCompositeConstruct %v3float %39 %40 %41 + %44 = OpLoad %float %arg_4 + %32 = OpImageSampleExplicitLod %v4float %36 %43 Lod|ConstOffset %44 %48 + OpStore %res %32 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %49 - %51 = OpLabel - %52 = OpFunctionCall %void %textureSampleLevel_faa6d7 +%vertex_main_inner = OpFunction %v4float None %51 + %53 = OpLabel + %54 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %54 = OpLabel - %55 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %55 + %56 = OpLabel + %57 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %57 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %57 = OpLabel - %58 = OpFunctionCall %void %textureSampleLevel_faa6d7 + %59 = OpLabel + %60 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %60 = OpLabel - %61 = OpFunctionCall %void %textureSampleLevel_faa6d7 + %62 = OpLabel + %63 = OpFunctionCall %void %textureSampleLevel_faa6d7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl index b9a723f4bc..aa0a6a90cb 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/faa6d7.wgsl.expected.wgsl @@ -3,10 +3,10 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_faa6d7() { - var arg_2 = vec2(); + var arg_2 = vec2(1.0f); var arg_3 = 1u; var arg_4 = 1.0f; - const arg_5 = vec2(); + const arg_5 = vec2(1i); var res : vec4 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4, arg_5); } diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl index 013b1325ff..4b45581b8d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl @@ -25,7 +25,7 @@ // fn textureSampleLevel(texture: texture_depth_cube_array, sampler: sampler, coords: vec3, array_index: u32, level: i32) -> f32 fn textureSampleLevel_ff11bc() { - var arg_2 = vec3(); + var arg_2 = vec3(1.f); var arg_3 = 1u; var arg_4 = 1i; var res: f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl index fc2da63556..a185c7e10d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ff11bc() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl index fc2da63556..a185c7e10d 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ TextureCubeArray arg_0 : register(t0, space1); SamplerState arg_1 : register(s1, space1); void textureSampleLevel_ff11bc() { - float3 arg_2 = (0.0f).xxx; + float3 arg_2 = (1.0f).xxx; uint arg_3 = 1u; int arg_4 = 1; float res = arg_0.SampleLevel(arg_1, float4(arg_2, float(arg_3)), arg_4).x; diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.msl index a6166a06ac..a6909d56ab 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.msl @@ -2,7 +2,7 @@ using namespace metal; void textureSampleLevel_ff11bc(depthcube_array tint_symbol_1, sampler tint_symbol_2) { - float3 arg_2 = float3(0.0f); + float3 arg_2 = float3(1.0f); uint arg_3 = 1u; int arg_4 = 1; float res = tint_symbol_1.sample(tint_symbol_2, arg_2, arg_3, level(arg_4)); diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.spvasm index 65b80ac3be..ce0b5554d9 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 64 +; Bound: 65 ; Schema: 0 OpCapability Shader OpCapability SampledCubeArray @@ -47,65 +47,66 @@ %void = OpTypeVoid %15 = OpTypeFunction %void %v3float = OpTypeVector %float 3 - %20 = OpConstantNull %v3float + %float_1 = OpConstant %float 1 + %21 = OpConstantComposite %v3float %float_1 %float_1 %float_1 %_ptr_Function_v3float = OpTypePointer Function %v3float + %24 = OpConstantNull %v3float %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %27 = OpConstantNull %uint + %29 = OpConstantNull %uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %32 = OpConstantNull %int - %37 = OpTypeSampledImage %11 + %34 = OpConstantNull %int + %39 = OpTypeSampledImage %11 %_ptr_Function_float = OpTypePointer Function %float - %50 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %52 = OpTypeFunction %v4float %textureSampleLevel_ff11bc = OpFunction %void None %15 %18 = OpLabel - %arg_2 = OpVariable %_ptr_Function_v3float Function %20 - %arg_3 = OpVariable %_ptr_Function_uint Function %27 - %arg_4 = OpVariable %_ptr_Function_int Function %32 + %arg_2 = OpVariable %_ptr_Function_v3float Function %24 + %arg_3 = OpVariable %_ptr_Function_uint Function %29 + %arg_4 = OpVariable %_ptr_Function_int Function %34 %res = OpVariable %_ptr_Function_float Function %8 - OpStore %arg_2 %20 + OpStore %arg_2 %21 OpStore %arg_3 %uint_1 OpStore %arg_4 %int_1 - %35 = OpLoad %14 %arg_1 - %36 = OpLoad %11 %arg_0 - %38 = OpSampledImage %37 %36 %35 - %39 = OpLoad %v3float %arg_2 - %40 = OpCompositeExtract %float %39 0 - %41 = OpCompositeExtract %float %39 1 - %42 = OpCompositeExtract %float %39 2 - %44 = OpLoad %uint %arg_3 - %43 = OpConvertUToF %float %44 - %45 = OpCompositeConstruct %v4float %40 %41 %42 %43 - %47 = OpLoad %int %arg_4 - %46 = OpConvertSToF %float %47 - %34 = OpImageSampleExplicitLod %v4float %38 %45 Lod %46 - %33 = OpCompositeExtract %float %34 0 - OpStore %res %33 + %37 = OpLoad %14 %arg_1 + %38 = OpLoad %11 %arg_0 + %40 = OpSampledImage %39 %38 %37 + %41 = OpLoad %v3float %arg_2 + %42 = OpCompositeExtract %float %41 0 + %43 = OpCompositeExtract %float %41 1 + %44 = OpCompositeExtract %float %41 2 + %46 = OpLoad %uint %arg_3 + %45 = OpConvertUToF %float %46 + %47 = OpCompositeConstruct %v4float %42 %43 %44 %45 + %49 = OpLoad %int %arg_4 + %48 = OpConvertSToF %float %49 + %36 = OpImageSampleExplicitLod %v4float %40 %47 Lod %48 + %35 = OpCompositeExtract %float %36 0 + OpStore %res %35 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %50 - %52 = OpLabel - %53 = OpFunctionCall %void %textureSampleLevel_ff11bc +%vertex_main_inner = OpFunction %v4float None %52 + %54 = OpLabel + %55 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %15 - %55 = OpLabel - %56 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %56 + %57 = OpLabel + %58 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %58 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %15 - %59 = OpLabel - %60 = OpFunctionCall %void %textureSampleLevel_ff11bc + %60 = OpLabel + %61 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturn OpFunctionEnd %compute_main = OpFunction %void None %15 - %62 = OpLabel - %63 = OpFunctionCall %void %textureSampleLevel_ff11bc + %63 = OpLabel + %64 = OpFunctionCall %void %textureSampleLevel_ff11bc OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl index 31ed6feff9..3f0462a29e 100644 --- a/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureSampleLevel/ff11bc.wgsl.expected.wgsl @@ -3,7 +3,7 @@ @group(1) @binding(1) var arg_1 : sampler; fn textureSampleLevel_ff11bc() { - var arg_2 = vec3(); + var arg_2 = vec3(1.0f); var arg_3 = 1u; var arg_4 = 1i; var res : f32 = textureSampleLevel(arg_0, arg_1, arg_2, arg_3, arg_4); diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl index 8c8d6c6b7d..7cd1264a78 100644 --- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl +++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_00ca64() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl index bc0aef6c0f..28af169b3f 100644 --- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_00ca64() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl index bc0aef6c0f..28af169b3f 100644 --- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_00ca64() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl index 2d80cee90f..7f9cf0d1ee 100644 --- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_00ca64() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl index eb9a573eec..f99ba1fbf8 100644 --- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_00ca64(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm index 4469ec0687..5c08814a25 100644 --- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_00ca64 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_00ca64 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_00ca64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_00ca64 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_00ca64 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_00ca64 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl index a9d8fc4a83..9672254b81 100644 --- a/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/00ca64.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_00ca64() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl index 8ca7f68ab0..64ec2f8eda 100644 --- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_0148bd() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl index 05d3e3557c..dcf713b513 100644 --- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0148bd() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl index 05d3e3557c..dcf713b513 100644 --- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0148bd() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl index c028f233df..54ea2954b5 100644 --- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0148bd() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl index 0426dc033f..c813cb2e88 100644 --- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_0148bd(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm index 2d64adca33..046daad45a 100644 --- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0148bd = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_0148bd +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_0148bd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_0148bd - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_0148bd OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_0148bd + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl index 80f6c27d13..3da6033bb2 100644 --- a/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0148bd.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_0148bd() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl index 9195e698d2..ec9d7a977d 100644 --- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl +++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_05ce15() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl index c83a95c0fd..0c19880971 100644 --- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_05ce15() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl index c83a95c0fd..0c19880971 100644 --- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_05ce15() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl index 5437eda3ca..e40a987f83 100644 --- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_05ce15() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl index 9eb8590790..10e16a5e98 100644 --- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_05ce15(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - float4 arg_2 = float4(0.0f); + int2 arg_1 = int2(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.spvasm index 8120c433d5..e5dc0044a0 100644 --- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_05ce15 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_05ce15 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_05ce15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_05ce15 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_05ce15 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_05ce15 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl index 85050b5e87..611087824b 100644 --- a/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/05ce15.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_05ce15() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl index d1ee9965f2..31d8bf5a4a 100644 --- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_064c7f() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl index 8adf145298..711e1c7b32 100644 --- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_064c7f() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl index 8adf145298..711e1c7b32 100644 --- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_064c7f() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl index 00a4cf7bf7..2efa3e3eb2 100644 --- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_064c7f(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - float4 arg_2 = float4(0.0f); + int2 arg_1 = int2(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.spvasm index d6d60c0d1d..e81ac09cbf 100644 --- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -41,42 +41,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_064c7f = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_064c7f +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_064c7f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_064c7f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_064c7f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_064c7f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl index ba056bcdc1..853f005f84 100644 --- a/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/064c7f.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_064c7f() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl index 32f39e33e3..e1e22c9228 100644 --- a/test/tint/builtins/gen/var/textureStore/068641.wgsl +++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_068641() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl index 092e801f92..9823316e06 100644 --- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_068641() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl index 092e801f92..9823316e06 100644 --- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_068641() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl index f84a5f2ad5..d627f3c601 100644 --- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage3D arg_0; void textureStore_068641() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl index a35ed83af9..0c0aa5472b 100644 --- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_068641(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - uint4 arg_2 = uint4(0u); + int3 arg_1 = int3(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm index b77d315a09..5c3f3607da 100644 --- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %23 = OpConstantNull %v3int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_068641 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_068641 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_068641 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_068641 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_068641 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_068641 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_068641 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl index bad48dd022..6e49bfc488 100644 --- a/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/068641.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_068641() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl index dcc3c36c06..2a75d72e3b 100644 --- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl +++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_06e49c() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl index 632d664621..120661e5a8 100644 --- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_06e49c() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl index 632d664621..120661e5a8 100644 --- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_06e49c() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl index 8e3732f306..265a86813c 100644 --- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_06e49c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl index a2beb54038..9c379af638 100644 --- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_06e49c(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.spvasm index 2db7642975..2460f5e114 100644 --- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_06e49c = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_06e49c +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_06e49c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_06e49c - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_06e49c OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_06e49c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl index 037325850c..9e0a36f231 100644 --- a/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/06e49c.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_06e49c() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl index 2a43425e01..7ddcb61d4e 100644 --- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl +++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_07548b() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl index 56dfb6c899..f33e906bc8 100644 --- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_07548b() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl index 56dfb6c899..f33e906bc8 100644 --- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_07548b() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl index 26da7f2e31..c1b94f0e79 100644 --- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_07548b() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl index 05af3aeb11..179f986810 100644 --- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_07548b(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - int4 arg_2 = int4(0); + uint3 arg_1 = uint3(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm index 02f5ee8797..2a78c9c12a 100644 --- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %23 = OpConstantNull %v3uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_07548b = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_07548b +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_07548b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_07548b + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_07548b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_07548b + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_07548b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl index c935ddc2f2..1938ab625f 100644 --- a/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/07548b.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_07548b() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl index 90e361931e..9a69d1496c 100644 --- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_0a1a79() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl index 62d0c96c5e..d52e0c7d34 100644 --- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0a1a79() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl index 62d0c96c5e..d52e0c7d34 100644 --- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0a1a79() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl index 931033dc59..b955a02177 100644 --- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_0a1a79() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl index 8d201f2352..532d8c8cc0 100644 --- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_0a1a79(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm index 417481a292..cedd43de5a 100644 --- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0a1a79 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_0a1a79 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_0a1a79 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_0a1a79 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_0a1a79 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_0a1a79 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl index 9c8a21632c..61f1fe98b0 100644 --- a/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0a1a79.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_0a1a79() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl index 8814567883..eb144e5c4c 100644 --- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_0af6b5() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl index a0e877b0d3..54842376b5 100644 --- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0af6b5() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl index a0e877b0d3..54842376b5 100644 --- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0af6b5() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl index 1ae6b6b55d..7d26a29b4d 100644 --- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_0af6b5() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl index cbf31010c7..de6f241890 100644 --- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_0af6b5(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - float4 arg_2 = float4(0.0f); + int2 arg_1 = int2(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.spvasm index 2c11b9d396..dbf15f2da6 100644 --- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_0af6b5 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_0af6b5 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_0af6b5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_0af6b5 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_0af6b5 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_0af6b5 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl index cba9b0299d..a0000ef8fe 100644 --- a/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0af6b5.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_0af6b5() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl index 09d159576d..655177ad3f 100644 --- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_0c3dff() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl index 2c960efa6f..5fe4eaf113 100644 --- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0c3dff() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl index 2c960efa6f..5fe4eaf113 100644 --- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_0c3dff() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl index 216ba1ae82..f7b64988b6 100644 --- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_0c3dff() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl index 7778f10003..d33b405af6 100644 --- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_0c3dff(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - uint4 arg_2 = uint4(0u); + int2 arg_1 = int2(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm index a5e6876376..fc42068c63 100644 --- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0c3dff = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_0c3dff +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_0c3dff OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_0c3dff + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_0c3dff OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_0c3dff + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_0c3dff OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl index 3da20f2e56..4f16e0df08 100644 --- a/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0c3dff.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_0c3dff() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl index 1c34d7f7e9..94cff34a80 100644 --- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_0cc825() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl index d0d43f7d64..9528144801 100644 --- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0cc825() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl index d0d43f7d64..9528144801 100644 --- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_0cc825() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl index 5b995273fb..08388eb2ab 100644 --- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_0cc825() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl index 64aa5a93ff..5ef5511549 100644 --- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_0cc825(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm index 93080b6962..e817aeb316 100644 --- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_0cc825 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_0cc825 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_0cc825 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_0cc825 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_0cc825 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_0cc825 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl index b5dce9d005..7073dc0c0b 100644 --- a/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/0cc825.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_0cc825() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl index 953b39a955..6a983d56c6 100644 --- a/test/tint/builtins/gen/var/textureStore/102722.wgsl +++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_102722() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl index e256ac82da..4c4b092a4a 100644 --- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_102722() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl index e256ac82da..4c4b092a4a 100644 --- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_102722() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl index f197dcc1af..50ee1c6ccb 100644 --- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_102722(texture1d tint_symbol_1) { int arg_1 = 1; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm index 0311196930..243634e320 100644 --- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_int = OpTypePointer Function %int %21 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_102722 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %21 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 OpStore %arg_1 %int_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %int %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_102722 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_102722 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_102722 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_102722 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_102722 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_102722 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl index ca67293db0..34b69c3ad6 100644 --- a/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/102722.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_102722() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl index 9e357ca0c0..36d107348a 100644 --- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl +++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_158cf0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl index c2d4244d53..dba67c88a1 100644 --- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_158cf0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl index c2d4244d53..dba67c88a1 100644 --- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_158cf0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl index 3fbe7e30ae..fd42714a81 100644 --- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_158cf0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl index b53dec42a1..e5a7cc7785 100644 --- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_158cf0(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm index 540fcce90e..2316c2dade 100644 --- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %30 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_158cf0 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2uint %arg_1 - %33 = OpCompositeExtract %uint %32 0 - %34 = OpCompositeExtract %uint %32 1 - %35 = OpLoad %uint %arg_2 - %36 = OpCompositeConstruct %v3uint %33 %34 %35 - %37 = OpLoad %v4uint %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2uint %arg_1 + %35 = OpCompositeExtract %uint %34 0 + %36 = OpCompositeExtract %uint %34 1 + %37 = OpLoad %uint %arg_2 + %38 = OpCompositeConstruct %v3uint %35 %36 %37 + %39 = OpLoad %v4uint %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_158cf0 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_158cf0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_158cf0 + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_158cf0 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_158cf0 + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_158cf0 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl index 234e5ceade..cf77fa88d9 100644 --- a/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/158cf0.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_158cf0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl index 58f17506e3..d7fda87a80 100644 --- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_1839f2() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl index a349cc71e0..c7d1d01091 100644 --- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1839f2() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl index a349cc71e0..c7d1d01091 100644 --- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1839f2() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl index 290798d80d..80d857bdb6 100644 --- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_1839f2() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl index 2ab9268d6f..dfe79c1bd2 100644 --- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_1839f2(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - int4 arg_2 = int4(0); + uint2 arg_1 = uint2(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm index 9ceec9be8b..801a5de147 100644 --- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1839f2 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_1839f2 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_1839f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_1839f2 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_1839f2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_1839f2 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_1839f2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl index 8dbc1c9c72..53634abfb5 100644 --- a/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1839f2.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_1839f2() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl index 88a097bcdf..544693a714 100644 --- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_1a7d35() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl index 0a928d2b11..7fc2cd78f1 100644 --- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1a7d35() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl index 0a928d2b11..7fc2cd78f1 100644 --- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1a7d35() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl index 3e00907a46..bcd8839c15 100644 --- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1a7d35() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl index e5c4cd44d4..edf7dc33e9 100644 --- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_1a7d35(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm index 72a691f610..c73f137f23 100644 --- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1a7d35 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %36 = OpLoad %uint %arg_2 - %37 = OpCompositeConstruct %v3uint %34 %35 %36 - %38 = OpLoad %v4int %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %39 = OpLoad %uint %arg_2 + %40 = OpCompositeConstruct %v3uint %37 %38 %39 + %41 = OpLoad %v4int %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_1a7d35 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_1a7d35 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_1a7d35 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_1a7d35 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_1a7d35 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl index 81eb9a1216..d20a4b046f 100644 --- a/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1a7d35.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_1a7d35() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl index 4445c3d0a6..5fd9db6095 100644 --- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_1bbd08() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl index 9bbd9cf51d..ce81287544 100644 --- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_1bbd08() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl index 9bbd9cf51d..ce81287544 100644 --- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_1bbd08() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl index 8bbedc5a87..ebbd4b4b35 100644 --- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_1bbd08() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl index a09fc63482..25ebb7093c 100644 --- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_1bbd08(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - float4 arg_2 = float4(0.0f); + int3 arg_1 = int3(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.spvasm index e5356afe90..c67fbe59a6 100644 --- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_1bbd08 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_1bbd08 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_1bbd08 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_1bbd08 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_1bbd08 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_1bbd08 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl index 7043ee1847..0f2939e40b 100644 --- a/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1bbd08.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_1bbd08() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl index 383b4f07d5..b7226e4a6f 100644 --- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_1c02e7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl index 4fe7a79eec..722133e887 100644 --- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1c02e7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl index 4fe7a79eec..722133e887 100644 --- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1c02e7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl index 43e87d1e0a..20a007aba2 100644 --- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1c02e7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl index a2ef827b92..2d3b1a9439 100644 --- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_1c02e7(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm index 8497c205e5..e73c6611f7 100644 --- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %30 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1c02e7 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_v4int Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_v4int Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2int %arg_1 - %33 = OpCompositeExtract %int %32 0 - %34 = OpCompositeExtract %int %32 1 - %35 = OpLoad %int %arg_2 - %36 = OpCompositeConstruct %v3int %33 %34 %35 - %37 = OpLoad %v4int %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2int %arg_1 + %35 = OpCompositeExtract %int %34 0 + %36 = OpCompositeExtract %int %34 1 + %37 = OpLoad %int %arg_2 + %38 = OpCompositeConstruct %v3int %35 %36 %37 + %39 = OpLoad %v4int %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_1c02e7 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_1c02e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_1c02e7 + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_1c02e7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_1c02e7 + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_1c02e7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl index 1632c653a8..68cd402ad3 100644 --- a/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1c02e7.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_1c02e7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl index 252b14a19f..fbfcdb4c4c 100644 --- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_1dc954() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl index 63191dfbdb..5b510fb09e 100644 --- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_1dc954() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl index 63191dfbdb..5b510fb09e 100644 --- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_1dc954() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl index 78aa861ce6..7263621743 100644 --- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_1dc954(texture1d tint_symbol_1) { uint arg_1 = 1u; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm index 2d08c73a1c..d5eb6a33e3 100644 --- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_uint = OpTypePointer Function %uint %21 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1dc954 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %21 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 OpStore %arg_1 %uint_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %uint %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_1dc954 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_1dc954 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_1dc954 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_1dc954 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_1dc954 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_1dc954 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl index 498cfc4971..7030e86f16 100644 --- a/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1dc954.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_1dc954() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl index cb704a8a79..16e07792f5 100644 --- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_1e20f2() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl index d7b4a2b09b..6100385b67 100644 --- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1e20f2() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl index d7b4a2b09b..6100385b67 100644 --- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_1e20f2() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl index 1ea1aafa2c..2f54945ebd 100644 --- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32f) uniform highp writeonly image2D arg_0; void textureStore_1e20f2() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl index 698070e412..de3d80e180 100644 --- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_1e20f2(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - float4 arg_2 = float4(0.0f); + uint2 arg_1 = uint2(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm index db477684f4..5f435d0165 100644 --- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_1e20f2 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_1e20f2 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_1e20f2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_1e20f2 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_1e20f2 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_1e20f2 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl index 1116037b1d..966a95747d 100644 --- a/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1e20f2.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_1e20f2() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl index 11f4582343..3992003e46 100644 --- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_1f1ef8() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl index ffa0ed23cb..35af4754b1 100644 --- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1f1ef8() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl index ffa0ed23cb..35af4754b1 100644 --- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_1f1ef8() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl index 81f7833d66..e04a7f1c61 100644 --- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_1f1ef8() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl index d7023a4d02..1b49bdfe30 100644 --- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_1f1ef8(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm index 2f0bad392b..d604a9a89e 100644 --- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_1f1ef8 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_1f1ef8 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_1f1ef8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_1f1ef8 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_1f1ef8 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_1f1ef8 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl index 5a4ba99490..8c4b8d021b 100644 --- a/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/1f1ef8.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_1f1ef8() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl index c00156f216..0c9fc1f503 100644 --- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl +++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_207fdd() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl index 9e5acc4001..3756cec601 100644 --- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_207fdd() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl index 9e5acc4001..3756cec601 100644 --- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_207fdd() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl index be45a70480..fd81cb65c2 100644 --- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_207fdd() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl index 97a7ca9c5f..396bd7c39b 100644 --- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_207fdd(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - float4 arg_2 = float4(0.0f); + uint3 arg_1 = uint3(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm index b40adc55e4..4ac25eb0bd 100644 --- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_207fdd = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_207fdd +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_207fdd OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_207fdd - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_207fdd OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_207fdd + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl index 703e7ce5ad..52d756f6d5 100644 --- a/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/207fdd.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_207fdd() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl index ab56effbcb..741a0d9050 100644 --- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl +++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_22d955() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl index ac28249652..1c5aefefdf 100644 --- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22d955() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl index ac28249652..1c5aefefdf 100644 --- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22d955() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl index d8279c2c8f..2e6e6d41fb 100644 --- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_22d955() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl index be88306d8c..d83ba28e45 100644 --- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_22d955(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm index dff6bf19ff..80c036355a 100644 --- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_22d955 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %36 = OpLoad %int %arg_2 - %37 = OpCompositeConstruct %v3int %34 %35 %36 - %38 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %39 = OpLoad %int %arg_2 + %40 = OpCompositeConstruct %v3int %37 %38 %39 + %41 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_22d955 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_22d955 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_22d955 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_22d955 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_22d955 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl index 9ca9d8e2b5..2bdc27e3f8 100644 --- a/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/22d955.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_22d955() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl index 6e2e0a5b61..6ad75f81ae 100644 --- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl +++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_22f045() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl index 9f081c32d6..915ae9e5fc 100644 --- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22f045() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl index 9f081c32d6..915ae9e5fc 100644 --- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_22f045() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl index d57b75b7b9..0788b2374b 100644 --- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_22f045() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl index 0195bd5e98..8ebc61f7f6 100644 --- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_22f045(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.spvasm index 164d082554..c0333adf68 100644 --- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_22f045 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_22f045 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_22f045 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_22f045 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_22f045 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_22f045 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl index 28b7b5b55d..10e82ad9c8 100644 --- a/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/22f045.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_22f045() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl index a6845ca380..7a8c88510a 100644 --- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_2383fc() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl index ea89155ecf..46d7d3df67 100644 --- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2383fc() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl index ea89155ecf..46d7d3df67 100644 --- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2383fc() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl index 73f19f9895..c298527d27 100644 --- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_2383fc() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl index f343b91e1e..0e54c94664 100644 --- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_2383fc(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm index b31de19d92..6d925bf0d8 100644 --- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2383fc = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_2383fc +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_2383fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_2383fc - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_2383fc OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_2383fc + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl index a8fb10cc0b..c9e1dd2910 100644 --- a/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2383fc.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_2383fc() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl index 651efea18c..008b5c9b70 100644 --- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl +++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_258ab0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl index 81ca1b1cc0..7047e7cabd 100644 --- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_258ab0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl index 81ca1b1cc0..7047e7cabd 100644 --- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_258ab0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl index 63b7d96a08..d0c070f8b8 100644 --- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_258ab0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl index e471f4881b..0c3513a28d 100644 --- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_258ab0(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.spvasm index 21ec492362..bcf4eb58e7 100644 --- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_258ab0 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_258ab0 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_258ab0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_258ab0 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_258ab0 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_258ab0 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl index 17cc7656f8..caf28b203b 100644 --- a/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/258ab0.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_258ab0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl index 137e2cd63f..224f16a5c7 100644 --- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl +++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_26bf70() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl index 57341d9428..c7747ff835 100644 --- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_26bf70() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl index 57341d9428..c7747ff835 100644 --- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_26bf70() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl index 048b5b4332..e4bbc300a7 100644 --- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_26bf70() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl index 73242ad956..c86dfd56be 100644 --- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_26bf70(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - uint4 arg_2 = uint4(0u); + int2 arg_1 = int2(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm index 188aded061..94290df873 100644 --- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_26bf70 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_26bf70 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_26bf70 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_26bf70 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_26bf70 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_26bf70 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_26bf70 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl index 9585cafc5b..d83fa4d0ea 100644 --- a/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/26bf70.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_26bf70() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl index 39d8497c7a..074f8c3302 100644 --- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_2796b4() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl index 63eefce1cc..757e349cc4 100644 --- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_2796b4() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl index 63eefce1cc..757e349cc4 100644 --- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_2796b4() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl index c2ebcd9a9f..cb47485d94 100644 --- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_2796b4(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - int4 arg_2 = int4(0); + int3 arg_1 = int3(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.spvasm index d79adda805..e2080b02d7 100644 --- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -41,44 +41,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2796b4 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v3int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_2796b4 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_2796b4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_2796b4 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_2796b4 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_2796b4 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl index 00dfc5d60c..cceb51307c 100644 --- a/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2796b4.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_2796b4() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl index 98f2ada4d4..2e7da69ede 100644 --- a/test/tint/builtins/gen/var/textureStore/285218.wgsl +++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_285218() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl index e6d6c3988e..fc40d7491e 100644 --- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_285218() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl index e6d6c3988e..fc40d7491e 100644 --- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_285218() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl index c0e94ba4e4..f6bf32ac7f 100644 --- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_285218(texture1d tint_symbol_1) { uint arg_1 = 1u; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm index 6603867b23..b36c2a1263 100644 --- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_285218 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %uint_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %uint %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_285218 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_285218 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_285218 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_285218 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_285218 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_285218 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl index a2e8b60165..1685bc203c 100644 --- a/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/285218.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_285218() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl index 644c8343a6..889a179332 100644 --- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl +++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_28a7ec() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl index adc7c02740..f46800b646 100644 --- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_28a7ec() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl index adc7c02740..f46800b646 100644 --- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_28a7ec() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl index f477fb314f..9361577384 100644 --- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_28a7ec() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl index 55511c188d..92ed017f9c 100644 --- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_28a7ec(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm index 1ce8ddfb89..be9001046a 100644 --- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_28a7ec = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_28a7ec +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_28a7ec OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_28a7ec - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_28a7ec OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_28a7ec + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl index ab8d410a9e..bb7480594d 100644 --- a/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/28a7ec.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_28a7ec() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl index 1e0f482608..1333e720e7 100644 --- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2ac6c7() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl index 299e980785..15517dbf4b 100644 --- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ac6c7() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl index 299e980785..15517dbf4b 100644 --- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ac6c7() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl index da12ebc7d2..37ba8ed108 100644 --- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_2ac6c7(texture1d tint_symbol_1) { int arg_1 = 1; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.spvasm index f15467a58d..cd316b5896 100644 --- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_2ac6c7 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %int_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %int %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2ac6c7 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_2ac6c7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_2ac6c7 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_2ac6c7 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_2ac6c7 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_2ac6c7 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl index 7cb7cde07e..3a9faa7f84 100644 --- a/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2ac6c7.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_2ac6c7() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl index 588630b6f2..08d4370f76 100644 --- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_2d2835() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl index b0cc94002b..5feb22c306 100644 --- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2d2835() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl index b0cc94002b..5feb22c306 100644 --- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_2d2835() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl index 30f7ba53aa..2fe97bd2b4 100644 --- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_2d2835(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm index ef33f05a9c..f699efe04a 100644 --- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,52 +42,54 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_2d2835 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %36 = OpLoad %uint %arg_2 + %37 = OpCompositeConstruct %v3uint %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_2d2835 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_2d2835 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_2d2835 + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_2d2835 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_2d2835 + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_2d2835 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl index 76e91c0c3b..2e503b1d51 100644 --- a/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2d2835.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_2d2835() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl index 2512a835a6..ffe422ad94 100644 --- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_2e6102() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl index ae9f5ddea0..f1a37fb79d 100644 --- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_2e6102() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl index ae9f5ddea0..f1a37fb79d 100644 --- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_2e6102() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl index e3185e6431..a2efe7d73d 100644 --- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32f) uniform highp writeonly image2D arg_0; void textureStore_2e6102() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl index 76221f2de7..b12fdb904b 100644 --- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_2e6102(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - float4 arg_2 = float4(0.0f); + uint2 arg_1 = uint2(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm index e9c074ce3d..d17728d9c5 100644 --- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_2e6102 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2e6102 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_2e6102 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_2e6102 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_2e6102 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_2e6102 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl index 212a545d96..8b5556aade 100644 --- a/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2e6102.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_2e6102() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl index 1501b1098c..d293c97a68 100644 --- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2eb2a4() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl index 36b1326f29..b0c2cc0db5 100644 --- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2eb2a4() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl index 36b1326f29..b0c2cc0db5 100644 --- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2eb2a4() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl index 07e1c2a3b4..d3bd936e18 100644 --- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_2eb2a4(texture1d tint_symbol_1) { int arg_1 = 1; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm index c00ec81f1d..19d931f6d5 100644 --- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_int = OpTypePointer Function %int %21 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_2eb2a4 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %21 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 OpStore %arg_1 %int_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %int %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_2eb2a4 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_2eb2a4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_2eb2a4 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_2eb2a4 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_2eb2a4 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_2eb2a4 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl index 38b1ccb7bc..7323e1dc14 100644 --- a/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2eb2a4.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_2eb2a4() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl index fb7b871539..f2d862186d 100644 --- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_2ed2a3() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl index 5d63a7b6ae..c347426d1d 100644 --- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ed2a3() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl index 5d63a7b6ae..c347426d1d 100644 --- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_2ed2a3() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl index e3b850b99d..e4a9643ef7 100644 --- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_2ed2a3(texture1d tint_symbol_1) { int arg_1 = 1; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.spvasm index c692c2f9a2..e07c68c6e7 100644 --- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_2ed2a3 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %int_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %int %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_2ed2a3 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_2ed2a3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_2ed2a3 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_2ed2a3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_2ed2a3 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_2ed2a3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl index 54b46ea4e8..39e5cc1b7e 100644 --- a/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/2ed2a3.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_2ed2a3() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl index 392288fefd..16db314e3c 100644 --- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl +++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_30b0b0() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl index 79d2f712c3..2440a69705 100644 --- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_30b0b0() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl index 79d2f712c3..2440a69705 100644 --- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_30b0b0() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl index 9fd35ef923..87d1edbf99 100644 --- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_30b0b0() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl index 4b580cddcd..e2d8c743d5 100644 --- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_30b0b0(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm index 15a126f57e..e8ee410f57 100644 --- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_30b0b0 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_30b0b0 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_30b0b0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_30b0b0 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_30b0b0 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_30b0b0 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl index 9ee34ee6ea..cc9fc8a32f 100644 --- a/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/30b0b0.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_30b0b0() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl index 05bde5ffcf..27b9e30e05 100644 --- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl +++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_31745b() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl index 33865302fc..4e8b4bb56a 100644 --- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_31745b() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl index 33865302fc..4e8b4bb56a 100644 --- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_31745b() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl index bde273accd..9a436dc8bd 100644 --- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_31745b(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - int4 arg_2 = int4(0); + int2 arg_1 = int2(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.spvasm index 016eb27321..683bc163c0 100644 --- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -41,44 +41,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_31745b = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_31745b +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_31745b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_31745b - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_31745b OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_31745b + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl index 03ffd0b2a9..edacd7b445 100644 --- a/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/31745b.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_31745b() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl index d7354e6ffb..e31b404a77 100644 --- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl +++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_32f368() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl index 1c217b20a2..2562e61d18 100644 --- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_32f368() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl index 1c217b20a2..2562e61d18 100644 --- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_32f368() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl index b86d5eb850..77d4a8b93e 100644 --- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_32f368() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl index 3daf6cbadb..6f84388a16 100644 --- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_32f368(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm index a154105c0f..2bed16d1ad 100644 --- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_32f368 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %36 = OpLoad %int %arg_2 + %37 = OpCompositeConstruct %v3int %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_32f368 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_32f368 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_32f368 + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_32f368 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_32f368 + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_32f368 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl index 06eceeda3d..d36096e1b2 100644 --- a/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/32f368.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_32f368() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl index b5d2431339..f8c0832e7a 100644 --- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl +++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_330b7c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl index a92e0d0db8..1338528d65 100644 --- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_330b7c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl index a92e0d0db8..1338528d65 100644 --- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_330b7c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl index e6ed5cba1b..d18edddda7 100644 --- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_330b7c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl index eca28c9fa2..fd47878aa6 100644 --- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_330b7c(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm index fcaad14b8c..ee90256f77 100644 --- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_330b7c = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %36 = OpLoad %uint %arg_2 + %37 = OpCompositeConstruct %v3uint %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_330b7c +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_330b7c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_330b7c + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_330b7c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_330b7c + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_330b7c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl index 9770e414fa..dabad78b47 100644 --- a/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/330b7c.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_330b7c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl index 55d78a093e..4dfd7ecf26 100644 --- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl +++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_331aee() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl index 1070c26429..8e1189f354 100644 --- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_331aee() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl index 1070c26429..8e1189f354 100644 --- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_331aee() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl index 6d0ade0e9f..e2737d6fbb 100644 --- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_331aee() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl index 94c0dee52b..0b7bcaa6bc 100644 --- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_331aee(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - float4 arg_2 = float4(0.0f); + int3 arg_1 = int3(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.spvasm index df8cccf6e2..a06250e0a9 100644 --- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_331aee = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_331aee +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_331aee OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_331aee - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_331aee OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_331aee + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl index 97cea3bf30..115bdee739 100644 --- a/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/331aee.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_331aee() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl index b713ef0cec..f075034a13 100644 --- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl +++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_33cec0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl index df6a6f3184..ee79489f65 100644 --- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_33cec0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl index df6a6f3184..ee79489f65 100644 --- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_33cec0() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl index 63ee534785..0e7b456294 100644 --- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_33cec0() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl index 34013f866a..94eda71de9 100644 --- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_33cec0(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm index 9419b08cf5..2fe8ee7d0a 100644 --- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_33cec0 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_33cec0 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_33cec0 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_33cec0 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_33cec0 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_33cec0 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl index 69b0ffda07..e1f07b1507 100644 --- a/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/33cec0.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_33cec0() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl index 4c3130b24c..b8a7ce15a3 100644 --- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl +++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_37ffd4() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl index 96673e8e44..f5ad13eb97 100644 --- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_37ffd4() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl index 96673e8e44..f5ad13eb97 100644 --- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_37ffd4() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl index e8eb1a4a1a..66ed916c74 100644 --- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_37ffd4() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl index 7e89ceb7f1..36e93dc147 100644 --- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_37ffd4(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.spvasm index 8c2ae063ff..6c02239d7e 100644 --- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_37ffd4 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_37ffd4 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_37ffd4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_37ffd4 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_37ffd4 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_37ffd4 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl index a26203ab2b..317fe2c233 100644 --- a/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/37ffd4.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_37ffd4() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl index 37b7f42da7..97302a490a 100644 --- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl +++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_38e8d7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl index 6e867ecc1c..317005d017 100644 --- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_38e8d7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl index 6e867ecc1c..317005d017 100644 --- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_38e8d7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl index 7a6850e040..a2fdcf8e31 100644 --- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_38e8d7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl index c22bedbdef..98b3084368 100644 --- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_38e8d7(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm index 623d520d43..0125a43c78 100644 --- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_38e8d7 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %36 = OpLoad %int %arg_2 - %37 = OpCompositeConstruct %v3int %34 %35 %36 - %38 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %39 = OpLoad %int %arg_2 + %40 = OpCompositeConstruct %v3int %37 %38 %39 + %41 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_38e8d7 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_38e8d7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_38e8d7 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_38e8d7 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_38e8d7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl index 37b07ea067..48f79ffbe9 100644 --- a/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/38e8d7.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_38e8d7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl index 504713ee00..b492c44173 100644 --- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_3a52ac() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl index f682606ef8..a32e01842b 100644 --- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3a52ac() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl index f682606ef8..a32e01842b 100644 --- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3a52ac() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl index 4ae9505508..d8620226f4 100644 --- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_3a52ac() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl index e243637964..65f36a53d7 100644 --- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_3a52ac(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm index ef89e77746..1496de0347 100644 --- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %30 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3a52ac = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_v4int Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_v4int Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2int %arg_1 - %33 = OpCompositeExtract %int %32 0 - %34 = OpCompositeExtract %int %32 1 - %35 = OpLoad %int %arg_2 - %36 = OpCompositeConstruct %v3int %33 %34 %35 - %37 = OpLoad %v4int %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2int %arg_1 + %35 = OpCompositeExtract %int %34 0 + %36 = OpCompositeExtract %int %34 1 + %37 = OpLoad %int %arg_2 + %38 = OpCompositeConstruct %v3int %35 %36 %37 + %39 = OpLoad %v4int %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_3a52ac +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_3a52ac OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_3a52ac + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_3a52ac OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_3a52ac + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_3a52ac OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl index 83065541e6..7b6336a0e7 100644 --- a/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3a52ac.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_3a52ac() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl index 6301506517..906047cd46 100644 --- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_3bb7a1() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl index e18ed4d8d4..46a260c359 100644 --- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3bb7a1() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl index e18ed4d8d4..46a260c359 100644 --- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_3bb7a1() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl index a46b20beaa..ac01732958 100644 --- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_3bb7a1() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl index 70c180e005..57831d846a 100644 --- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_3bb7a1(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm index f7e7b38d38..da8e7d9911 100644 --- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_3bb7a1 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %36 = OpLoad %int %arg_2 + %37 = OpCompositeConstruct %v3int %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_3bb7a1 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_3bb7a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_3bb7a1 + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_3bb7a1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_3bb7a1 + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_3bb7a1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl index 145dc9a99f..75a3552207 100644 --- a/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3bb7a1.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_3bb7a1() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl index dd01b7f140..47169e7091 100644 --- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_3bec15() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl index 7092f585ae..07f9859374 100644 --- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3bec15() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl index 7092f585ae..07f9859374 100644 --- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3bec15() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl index 75e47f1ba6..ae5ae1cd65 100644 --- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_3bec15(texture1d tint_symbol_1) { int arg_1 = 1; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm index 4688a0fe23..65e8ffe1b3 100644 --- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_int = OpTypePointer Function %int %21 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3bec15 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %21 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 OpStore %arg_1 %int_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %int %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3bec15 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_3bec15 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_3bec15 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_3bec15 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_3bec15 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_3bec15 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl index af39c20037..02803e99ab 100644 --- a/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3bec15.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_3bec15() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl index bffb6e2837..2d5497ae42 100644 --- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_3c1937() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl index 19a9b7b57c..b1f91c3a76 100644 --- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3c1937() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl index 19a9b7b57c..b1f91c3a76 100644 --- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3c1937() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl index 678f483310..87b1a47298 100644 --- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_3c1937(texture1d tint_symbol_1) { uint arg_1 = 1u; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm index 421d42f6e9..1633d5f544 100644 --- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4uint + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3c1937 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %25 OpStore %arg_1 %uint_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %uint %arg_1 + %29 = OpLoad %v4uint %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_3c1937 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_3c1937 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_3c1937 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_3c1937 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_3c1937 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_3c1937 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl index 568e12c5bc..1bb71e789e 100644 --- a/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3c1937.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_3c1937() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl index dedb10e41f..edc8ab5440 100644 --- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_3d6f01() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl index 6e3241b4bd..21d5a66c81 100644 --- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3d6f01() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl index 6e3241b4bd..21d5a66c81 100644 --- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_3d6f01() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl index 1e29e6b762..10a8e5d73b 100644 --- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_3d6f01(texture1d tint_symbol_1) { uint arg_1 = 1u; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm index ea9136851c..a16a364e7c 100644 --- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -46,41 +46,43 @@ %_ptr_Function_uint = OpTypePointer Function %uint %21 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_3d6f01 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %21 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 OpStore %arg_1 %uint_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %uint %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_3d6f01 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_3d6f01 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_3d6f01 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_3d6f01 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_3d6f01 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_3d6f01 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl index 693801cc08..a59f7a17b4 100644 --- a/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/3d6f01.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_3d6f01() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl index 29f4059ca7..dab5410501 100644 --- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl +++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_40c455() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl index 5d607d2004..e0c5f5c144 100644 --- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_40c455() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl index 5d607d2004..e0c5f5c144 100644 --- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_40c455() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl index 4ae299e2ea..0b15e40ed6 100644 --- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_40c455() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl index 477b39a98d..e724e08083 100644 --- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_40c455(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - float4 arg_2 = float4(0.0f); + uint2 arg_1 = uint2(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm index 91daa0abd9..0ddfe090f5 100644 --- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_40c455 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_40c455 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_40c455 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_40c455 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_40c455 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_40c455 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl index 6a5067913d..0865958478 100644 --- a/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/40c455.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_40c455() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl index b62f964d66..9365274e95 100644 --- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_4288fc() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl index bb76511ca7..8009fe8013 100644 --- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_4288fc() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl index bb76511ca7..8009fe8013 100644 --- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_4288fc() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl index 0b46698014..8b37e2b10d 100644 --- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_4288fc() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl index 578e1f874f..cb21571abc 100644 --- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_4288fc(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - float4 arg_2 = float4(0.0f); + uint3 arg_1 = uint3(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm index 78e13c6b51..0bde16b864 100644 --- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_4288fc = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_4288fc +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_4288fc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_4288fc - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_4288fc OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_4288fc + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl index 15e7b21839..52e3aeb826 100644 --- a/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4288fc.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_4288fc() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl index 5fe3eb259d..8b1099ff17 100644 --- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl +++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_441ba8() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl index 3af481a9be..17eb40c1c8 100644 --- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_441ba8() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl index 3af481a9be..17eb40c1c8 100644 --- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_441ba8() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl index ef4af5194c..1350e88823 100644 --- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage3D arg_0; void textureStore_441ba8() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl index 1464ab71ad..2315354818 100644 --- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_441ba8(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - uint4 arg_2 = uint4(0u); + int3 arg_1 = int3(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm index b6748801df..5757914dcf 100644 --- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %23 = OpConstantNull %v3int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_441ba8 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_441ba8 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_441ba8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_441ba8 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_441ba8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_441ba8 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_441ba8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl index 773999aa38..319ac4abbb 100644 --- a/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/441ba8.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_441ba8() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl index c5299a4fe3..23b0f00169 100644 --- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl +++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_44daa7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl index c2793dea82..fae9131191 100644 --- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_44daa7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl index c2793dea82..fae9131191 100644 --- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_44daa7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl index ea56040469..590dc7c62b 100644 --- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_44daa7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl index 3175b4ad5a..b366375a62 100644 --- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_44daa7(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.spvasm index 88c6042470..7bc33b4a98 100644 --- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_44daa7 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_44daa7 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_44daa7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_44daa7 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_44daa7 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_44daa7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl index 73656cbfae..c76b503316 100644 --- a/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/44daa7.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_44daa7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl index c0353f2555..34f0cd44ad 100644 --- a/test/tint/builtins/gen/var/textureStore/486500.wgsl +++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_486500() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl index 021c55ca75..d1703f0c76 100644 --- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_486500() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl index 021c55ca75..d1703f0c76 100644 --- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_486500() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl index 5dd0af7d25..fefc5a5390 100644 --- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_486500() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl index 0a5e6dab90..c0a151f81c 100644 --- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_486500(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - int4 arg_2 = int4(0); + uint3 arg_1 = uint3(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm index 7b219dfeed..cdc1231d62 100644 --- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %23 = OpConstantNull %v3uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_486500 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_486500 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_486500 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_486500 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_486500 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_486500 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_486500 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl index 8a03a81502..bea8b44135 100644 --- a/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/486500.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_486500() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl index 940719b3bc..accfa139f3 100644 --- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_4c454f() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl index 0fcd9a811a..113213f6c3 100644 --- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4c454f() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl index 0fcd9a811a..113213f6c3 100644 --- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4c454f() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl index 03846dc9a2..6cff1e9809 100644 --- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_4c454f(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm index 39e9b43b69..593df6eff8 100644 --- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -43,54 +43,57 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_4c454f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %36 = OpLoad %uint %arg_2 - %37 = OpCompositeConstruct %v3uint %34 %35 %36 - %38 = OpLoad %v4int %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %39 = OpLoad %uint %arg_2 + %40 = OpCompositeConstruct %v3uint %37 %38 %39 + %41 = OpLoad %v4int %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_4c454f +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_4c454f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_4c454f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_4c454f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_4c454f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl index 59de4ece5d..29e2d28cbb 100644 --- a/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4c454f.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_4c454f() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl index e17d98f9b6..65547f4c06 100644 --- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_4d359d() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl index e10746c79a..82e2e585e0 100644 --- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4d359d() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl index e10746c79a..82e2e585e0 100644 --- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4d359d() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl index 4ac18bcf78..7f3c1b3630 100644 --- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_4d359d(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm index 76be2024d0..9db4aebb6b 100644 --- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,56 +42,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_4d359d = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_4d359d +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_4d359d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_4d359d - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_4d359d OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_4d359d + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl index 19c62dd2e4..ae6aa59de4 100644 --- a/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4d359d.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_4d359d() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl index fbe26ee1cd..8a4c152eda 100644 --- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_4fc057() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl index ee4b614355..3ad78a4d3f 100644 --- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4fc057() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl index ee4b614355..3ad78a4d3f 100644 --- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_4fc057() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl index 039e0bb9d9..a61ea7959e 100644 --- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_4fc057() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl index c7d5dbbda7..d3ed57b16c 100644 --- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_4fc057(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm index 710a585b1b..f3cfd34cca 100644 --- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_4fc057 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %36 = OpLoad %int %arg_2 + %37 = OpCompositeConstruct %v3int %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_4fc057 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_4fc057 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_4fc057 + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_4fc057 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_4fc057 + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_4fc057 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl index 6cf8c4d7de..caa193c22d 100644 --- a/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/4fc057.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_4fc057() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl index bea26ba9cc..623255ec67 100644 --- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl +++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_506a71() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl index f75271ef40..8f0257d3c3 100644 --- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_506a71() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl index f75271ef40..8f0257d3c3 100644 --- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_506a71() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl index 1e20709283..d55f5d808f 100644 --- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_506a71(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - uint4 arg_2 = uint4(0u); + uint2 arg_1 = uint2(1u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm index 1f5a9ed7fe..ec7574f2e4 100644 --- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -41,44 +41,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_506a71 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_506a71 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_506a71 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_506a71 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_506a71 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_506a71 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl index 476f5e7996..a8dea61e5c 100644 --- a/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/506a71.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_506a71() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl index d2c793f575..c9fefcef79 100644 --- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl +++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_52f503() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl index 04d3b35206..7093326b8e 100644 --- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_52f503() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl index 04d3b35206..7093326b8e 100644 --- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_52f503() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl index c60635299b..d548df8933 100644 --- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_52f503() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl index 7bdcaded47..210163c436 100644 --- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_52f503(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - int4 arg_2 = int4(0); + uint2 arg_1 = uint2(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm index 73053df474..b5967d5494 100644 --- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_52f503 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_52f503 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_52f503 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_52f503 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_52f503 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_52f503 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_52f503 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl index e313fccbcd..5fafa0de42 100644 --- a/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/52f503.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_52f503() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl index 3aaeaa0108..eaab31e893 100644 --- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5841f8() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl index a823f2508c..eadabe6321 100644 --- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5841f8() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl index a823f2508c..eadabe6321 100644 --- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5841f8() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl index ae1b777c3e..fc888dde8b 100644 --- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_5841f8() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl index 7f3b6ae446..598bc90364 100644 --- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_5841f8(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm index ad31cfdd66..c12f9828a2 100644 --- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_5841f8 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %36 = OpLoad %uint %arg_2 + %37 = OpCompositeConstruct %v3uint %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_5841f8 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_5841f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_5841f8 + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_5841f8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_5841f8 + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_5841f8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl index 6e57d8dcca..bd769461b4 100644 --- a/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5841f8.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5841f8() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl index bd75214446..affb43aa1c 100644 --- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl +++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_59a0ab() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl index 717254eccc..88f5a2dcc4 100644 --- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_59a0ab() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl index 717254eccc..88f5a2dcc4 100644 --- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_59a0ab() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl index 3cdcbf3f8b..442c0c8e4b 100644 --- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_59a0ab() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl index a22db66769..15898bf092 100644 --- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_59a0ab(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.spvasm index 342787337f..4e2f6e7911 100644 --- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_59a0ab = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_59a0ab +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_59a0ab OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_59a0ab - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_59a0ab OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_59a0ab + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl index a48139004a..90e9ec8ffd 100644 --- a/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/59a0ab.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_59a0ab() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl index 8eba27a737..7c83c5a38e 100644 --- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_5a2f8f() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl index f6002770bf..bbcf0cf8cf 100644 --- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_5a2f8f() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl index f6002770bf..bbcf0cf8cf 100644 --- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_5a2f8f() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl index 7ffe1a41c7..336890752c 100644 --- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_5a2f8f(texture1d tint_symbol_1) { int arg_1 = 1; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm index 8fd643704e..d9aa5fa061 100644 --- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4int + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5a2f8f = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %25 OpStore %arg_1 %int_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %int %arg_1 + %29 = OpLoad %v4int %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_5a2f8f +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_5a2f8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_5a2f8f + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_5a2f8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_5a2f8f + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_5a2f8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl index 444c40b056..99ec886e08 100644 --- a/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5a2f8f.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_5a2f8f() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl index 12d19f5273..241e4cc374 100644 --- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5bc4f3() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl index fb3394f806..d5e0bc4a48 100644 --- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5bc4f3() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl index fb3394f806..d5e0bc4a48 100644 --- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5bc4f3() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl index 7983b81b14..f210ad5a1e 100644 --- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_5bc4f3(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm index 6603a0f712..ee825f4feb 100644 --- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,54 +42,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %30 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5bc4f3 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2uint %arg_1 - %33 = OpCompositeExtract %uint %32 0 - %34 = OpCompositeExtract %uint %32 1 - %35 = OpLoad %uint %arg_2 - %36 = OpCompositeConstruct %v3uint %33 %34 %35 - %37 = OpLoad %v4uint %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2uint %arg_1 + %35 = OpCompositeExtract %uint %34 0 + %36 = OpCompositeExtract %uint %34 1 + %37 = OpLoad %uint %arg_2 + %38 = OpCompositeConstruct %v3uint %35 %36 %37 + %39 = OpLoad %v4uint %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_5bc4f3 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_5bc4f3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_5bc4f3 + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_5bc4f3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_5bc4f3 + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_5bc4f3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl index 1c223d64e7..e1578baead 100644 --- a/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5bc4f3.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5bc4f3() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl index 6638789f30..93a6d15705 100644 --- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5ddc61() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl index 6126253746..cac835dea3 100644 --- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5ddc61() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl index 6126253746..cac835dea3 100644 --- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5ddc61() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl index 49630cfad3..df933c9788 100644 --- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_5ddc61() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl index d02d76e0d7..da2667ba16 100644 --- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_5ddc61(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm index 962f21616e..e0e9b55b5b 100644 --- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_5ddc61 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_5ddc61 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_5ddc61 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_5ddc61 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_5ddc61 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_5ddc61 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl index dc049dbce2..cd6c1f47ee 100644 --- a/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5ddc61.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5ddc61() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl index 3cb1f9eab3..bcc40ed6cd 100644 --- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_5f9a49() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl index 37a52f0280..9f0aa65d83 100644 --- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5f9a49() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl index 37a52f0280..9f0aa65d83 100644 --- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_5f9a49() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl index 648faf6b90..be9a922e81 100644 --- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0; void textureStore_5f9a49() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl index add811e2eb..22d41beea4 100644 --- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_5f9a49(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm index 435a41b16f..7a1737733a 100644 --- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_5f9a49 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %36 = OpLoad %uint %arg_2 + %37 = OpCompositeConstruct %v3uint %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_5f9a49 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_5f9a49 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_5f9a49 + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_5f9a49 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_5f9a49 + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_5f9a49 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl index 951d70c024..8bcf2051fa 100644 --- a/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/5f9a49.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_5f9a49() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl index 94aaf8b67f..ee3842c996 100644 --- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl +++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_602b5a() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl index d65e673344..11d300d29e 100644 --- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_602b5a() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl index d65e673344..11d300d29e 100644 --- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_602b5a() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl index f5d1847ee7..ffc25e39c2 100644 --- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_602b5a(texture1d tint_symbol_1) { uint arg_1 = 1u; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm index 534c8e1bb5..46c41f9a31 100644 --- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,40 +44,41 @@ %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_602b5a = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %uint_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %uint %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_602b5a +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_602b5a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_602b5a + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_602b5a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_602b5a + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_602b5a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl index ca22b449f9..2bd7ed19b6 100644 --- a/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/602b5a.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_602b5a() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl index e48ef90589..68a1d187e2 100644 --- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_60975f() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl index 15c91c67eb..5f9b1c94b2 100644 --- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_60975f() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl index 15c91c67eb..5f9b1c94b2 100644 --- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_60975f() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl index 0a167a8d5d..9f73ce3589 100644 --- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_60975f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl index e70fe51588..388245960b 100644 --- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_60975f(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm index 7807d15407..35a3e0d2fe 100644 --- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_60975f = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %36 = OpLoad %int %arg_2 + %37 = OpCompositeConstruct %v3int %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_60975f +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_60975f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_60975f + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_60975f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_60975f + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_60975f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl index bdd52cc6ba..319364f96d 100644 --- a/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/60975f.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_60975f() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl index eb287ee56b..88879bea79 100644 --- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl +++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_658a74() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl index e6112064db..dc2f280626 100644 --- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_658a74() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl index e6112064db..dc2f280626 100644 --- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_658a74() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl index d121d3c2ca..a310879838 100644 --- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_658a74(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.spvasm index 52fc52c42d..ab144815b1 100644 --- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,54 +42,57 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_658a74 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_658a74 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_658a74 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_658a74 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_658a74 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_658a74 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl index c29799bacf..d635e168f5 100644 --- a/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/658a74.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_658a74() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl index 4f6e6dfad2..12fea92220 100644 --- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl +++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_682fd6() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl index 613ddb2446..972a97efe6 100644 --- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_682fd6() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl index 613ddb2446..972a97efe6 100644 --- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_682fd6() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl index 8ef52b03f9..0d2c30eebc 100644 --- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_682fd6(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - uint4 arg_2 = uint4(0u); + int2 arg_1 = int2(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm index e7ffff92e8..d69210ff73 100644 --- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,44 +42,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_682fd6 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_682fd6 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_682fd6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_682fd6 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_682fd6 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_682fd6 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_682fd6 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl index a7d1e078f8..b88764679e 100644 --- a/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/682fd6.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_682fd6() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl index 5548e40311..89f19ea3f1 100644 --- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl +++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_699a1b() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl index 68a4450e0c..cc8bc8ba3e 100644 --- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_699a1b() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl index 68a4450e0c..cc8bc8ba3e 100644 --- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_699a1b() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl index b3427280e7..c418a4c6d3 100644 --- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_699a1b() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl index 57da1dac83..635d0144ed 100644 --- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_699a1b(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm index 2c1021a8c7..1b2bab9a2f 100644 --- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_699a1b = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %36 = OpLoad %uint %arg_2 + %37 = OpCompositeConstruct %v3uint %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_699a1b +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_699a1b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_699a1b + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_699a1b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_699a1b + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_699a1b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl index f40f039575..e15ec37040 100644 --- a/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/699a1b.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_699a1b() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl index bed4262c26..8c49a1ae01 100644 --- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_6b75c3() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl index d1842f9a0f..1da026ab9a 100644 --- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b75c3() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl index d1842f9a0f..1da026ab9a 100644 --- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b75c3() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl index 525cdb8cf8..4637282100 100644 --- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_6b75c3(texture1d tint_symbol_1) { int arg_1 = 1; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.spvasm index 436599f7ec..a170644e10 100644 --- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_6b75c3 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %int_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %int %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_6b75c3 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_6b75c3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_6b75c3 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_6b75c3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_6b75c3 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_6b75c3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl index d5492bb8f8..da4a7c75cc 100644 --- a/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6b75c3.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_6b75c3() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl index d31db6adef..2f19c1d3f6 100644 --- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_6b80d2() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl index dc45c996a0..df5337ae17 100644 --- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b80d2() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl index dc45c996a0..df5337ae17 100644 --- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_6b80d2() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl index 4ec6f6e3c5..872ebc4c71 100644 --- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_6b80d2(texture1d tint_symbol_1) { int arg_1 = 1; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm index cc127a7c30..e068ee961d 100644 --- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4int + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6b80d2 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %25 OpStore %arg_1 %int_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %int %arg_1 + %29 = OpLoad %v4int %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_6b80d2 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_6b80d2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_6b80d2 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_6b80d2 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_6b80d2 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_6b80d2 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl index e83366d627..6d34e2585e 100644 --- a/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6b80d2.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_6b80d2() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl index 21f50ca627..6b2ab9ab10 100644 --- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_6cff2e() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl index 030b9a173c..eb1d050b66 100644 --- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_6cff2e() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl index 030b9a173c..eb1d050b66 100644 --- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_6cff2e() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl index 31dca2829c..bd3b42adad 100644 --- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_6cff2e() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl index 47ac09aac6..62842d4576 100644 --- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_6cff2e(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - uint4 arg_2 = uint4(0u); + int2 arg_1 = int2(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm index 7907a0009e..e7c5b80803 100644 --- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6cff2e = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_6cff2e +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_6cff2e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_6cff2e + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_6cff2e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_6cff2e + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_6cff2e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl index 37ba249a35..decce81b7b 100644 --- a/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6cff2e.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_6cff2e() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl index 1caeb3ee2b..726096377b 100644 --- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_6da692() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl index 2188ce1d44..3a0b3524a4 100644 --- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6da692() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl index 2188ce1d44..3a0b3524a4 100644 --- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6da692() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl index c7bc567f98..8cc9b7c82b 100644 --- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6da692() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl index 305d2bdb7c..4f4cf301b6 100644 --- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_6da692(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm index 4296871beb..3dc1804347 100644 --- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6da692 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %36 = OpLoad %int %arg_2 - %37 = OpCompositeConstruct %v3int %34 %35 %36 - %38 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %39 = OpLoad %int %arg_2 + %40 = OpCompositeConstruct %v3int %37 %38 %39 + %41 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_6da692 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_6da692 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_6da692 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_6da692 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_6da692 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl index eb4983b2ee..3aef0ec28e 100644 --- a/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6da692.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_6da692() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl index 23a86761b7..b10038ef54 100644 --- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_6f8642() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl index 68d1ceebd3..3c1a7e3347 100644 --- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6f8642() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl index 68d1ceebd3..3c1a7e3347 100644 --- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_6f8642() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl index c44aae7667..47c47cca22 100644 --- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_6f8642() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl index 5b982098b2..9b423b5d19 100644 --- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_6f8642(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm index cd9d76a9ec..786268aa3e 100644 --- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_6f8642 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_6f8642 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_6f8642 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_6f8642 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_6f8642 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_6f8642 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl index 36630e46d4..cb9827a567 100644 --- a/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/6f8642.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_6f8642() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl index 7feec833b7..c758e8d3a2 100644 --- a/test/tint/builtins/gen/var/textureStore/726472.wgsl +++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_726472() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl index 773035346e..d825a2220f 100644 --- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_726472() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl index 773035346e..d825a2220f 100644 --- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_726472() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl index 5f2f55cff6..a4358df636 100644 --- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_726472(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - float4 arg_2 = float4(0.0f); + uint2 arg_1 = uint2(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm index 6670ea4691..f981daccee 100644 --- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -41,42 +41,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_726472 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_726472 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_726472 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_726472 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_726472 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_726472 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl index b0866a33d1..1712bd8d64 100644 --- a/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/726472.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_726472() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl index 08b9a1f5b3..a7805f3688 100644 --- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl +++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_72fa64() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl index 8de0613da2..1dbffbb82d 100644 --- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_72fa64() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl index 8de0613da2..1dbffbb82d 100644 --- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_72fa64() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl index 501db77b69..7dc7a4db31 100644 --- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_72fa64(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm index 2f14a12b79..f1980f305f 100644 --- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -43,55 +43,58 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_72fa64 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_72fa64 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_72fa64 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_72fa64 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_72fa64 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_72fa64 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl index 0e90aaba0f..a68ac82eb9 100644 --- a/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/72fa64.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_72fa64() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl index c28f3a2347..2063ea51fd 100644 --- a/test/tint/builtins/gen/var/textureStore/731349.wgsl +++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_731349() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl index 96475461bf..41c6295ebb 100644 --- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_731349() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl index 96475461bf..41c6295ebb 100644 --- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_731349() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl index 2fc13d7a11..7873e23857 100644 --- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_731349() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl index f7898d74ca..4c20f23938 100644 --- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_731349(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - float4 arg_2 = float4(0.0f); + int2 arg_1 = int2(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.spvasm index 0d4982f853..d80464130d 100644 --- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_731349 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_731349 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_731349 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_731349 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_731349 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_731349 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl index eb1aa14f46..8269e639e5 100644 --- a/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/731349.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_731349() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl index caabbdbddb..95ca71cebb 100644 --- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl +++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_73bbbc() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl index 689ab29619..df299910c4 100644 --- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_73bbbc() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl index 689ab29619..df299910c4 100644 --- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_73bbbc() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl index 59505cb632..f100d49c4f 100644 --- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8) uniform highp writeonly image2D arg_0; void textureStore_73bbbc() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl index 941e50fa75..df9a9549c1 100644 --- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_73bbbc(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - float4 arg_2 = float4(0.0f); + uint2 arg_1 = uint2(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm index 8b044627cd..d968e79628 100644 --- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_73bbbc = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_73bbbc +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_73bbbc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_73bbbc - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_73bbbc OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_73bbbc + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl index 7728131c42..a8c6754b4c 100644 --- a/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/73bbbc.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_73bbbc() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl index e085cce799..80276c2079 100644 --- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl +++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_752da6() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl index 74afe66697..897f76cae6 100644 --- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_752da6() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl index 74afe66697..897f76cae6 100644 --- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_752da6() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl index 4c49f79992..1d02b54b69 100644 --- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2D arg_0; void textureStore_752da6() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl index 14805dc55f..34cacd93e6 100644 --- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_752da6(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - int4 arg_2 = int4(0); + int2 arg_1 = int2(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.spvasm index 4b831a25d5..670bde4028 100644 --- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_752da6 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_752da6 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_752da6 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_752da6 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_752da6 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_752da6 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl index 5ec1d8d7df..7f429602cc 100644 --- a/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/752da6.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_752da6() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl index 1850240bd0..66154bc288 100644 --- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl +++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_779d14() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl index 1d92629c25..d8cc420f97 100644 --- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_779d14() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl index 1d92629c25..d8cc420f97 100644 --- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_779d14() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl index 3ad1db2316..3bd1e152fd 100644 --- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_779d14() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl index 0d04ed01a6..cb582aa487 100644 --- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_779d14(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm index f61b543658..d686881e3a 100644 --- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %30 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_779d14 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2uint %arg_1 - %33 = OpCompositeExtract %uint %32 0 - %34 = OpCompositeExtract %uint %32 1 - %35 = OpLoad %uint %arg_2 - %36 = OpCompositeConstruct %v3uint %33 %34 %35 - %37 = OpLoad %v4uint %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2uint %arg_1 + %35 = OpCompositeExtract %uint %34 0 + %36 = OpCompositeExtract %uint %34 1 + %37 = OpLoad %uint %arg_2 + %38 = OpCompositeConstruct %v3uint %35 %36 %37 + %39 = OpLoad %v4uint %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_779d14 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_779d14 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_779d14 + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_779d14 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_779d14 + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_779d14 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl index 543447b4c9..0af83b5ab6 100644 --- a/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/779d14.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_779d14() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl index 052401c266..add7ba4fdc 100644 --- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl +++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_77c0ae() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl index 04dafb025f..f6f06f743d 100644 --- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_77c0ae() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl index 04dafb025f..f6f06f743d 100644 --- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_77c0ae() { - int2 arg_1 = (0).xx; - uint4 arg_2 = (0u).xxxx; + int2 arg_1 = (1).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl index ebdb9079da..1b74a4ec49 100644 --- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_77c0ae() { - ivec2 arg_1 = ivec2(0); - uvec4 arg_2 = uvec4(0u); + ivec2 arg_1 = ivec2(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl index d7d84576de..35bc8704ac 100644 --- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_77c0ae(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - uint4 arg_2 = uint4(0u); + int2 arg_1 = int2(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm index 6bacd0e827..53da4acbe1 100644 --- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_77c0ae = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_77c0ae +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_77c0ae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_77c0ae + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_77c0ae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_77c0ae + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_77c0ae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl index 28994fc19b..2bcbf7b83e 100644 --- a/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/77c0ae.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_77c0ae() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl index c9fe4550dd..3588d57453 100644 --- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_7bb211() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl index 0074f0f58d..957b02a811 100644 --- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7bb211() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl index 0074f0f58d..957b02a811 100644 --- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7bb211() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl index 6d2729b89e..6941c58e84 100644 --- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_7bb211(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm index cb6aa19d90..afea97a2f0 100644 --- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,56 +42,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_7bb211 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_7bb211 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_7bb211 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_7bb211 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_7bb211 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_7bb211 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl index 990b9c1334..27b0ce8527 100644 --- a/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7bb211.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_7bb211() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl index 270a825cb3..c51618c40f 100644 --- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_7cec8d() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl index d31432b373..a90a31f01e 100644 --- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7cec8d() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl index d31432b373..a90a31f01e 100644 --- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_7cec8d() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl index 05b54d94dc..5d8dfd763a 100644 --- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_7cec8d() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl index bc6820285a..450a31ae88 100644 --- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_7cec8d(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm index b36ee5ff45..83c7715081 100644 --- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %30 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_7cec8d = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_v4int Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_v4int Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2int %arg_1 - %33 = OpCompositeExtract %int %32 0 - %34 = OpCompositeExtract %int %32 1 - %35 = OpLoad %int %arg_2 - %36 = OpCompositeConstruct %v3int %33 %34 %35 - %37 = OpLoad %v4int %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2int %arg_1 + %35 = OpCompositeExtract %int %34 0 + %36 = OpCompositeExtract %int %34 1 + %37 = OpLoad %int %arg_2 + %38 = OpCompositeConstruct %v3int %35 %36 %37 + %39 = OpLoad %v4int %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_7cec8d +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_7cec8d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_7cec8d + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_7cec8d OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_7cec8d + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_7cec8d OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl index 38fb600afb..77a6f711e7 100644 --- a/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7cec8d.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_7cec8d() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl index b64eb22d3f..1728981299 100644 --- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_7cf6e7() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl index 516eb5405f..5ba45d9faf 100644 --- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_7cf6e7() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl index 516eb5405f..5ba45d9faf 100644 --- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_7cf6e7() { - uint2 arg_1 = (0u).xx; - float4 arg_2 = (0.0f).xxxx; + uint2 arg_1 = (1u).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl index dc0045b273..7abe5344ea 100644 --- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_7cf6e7() { - uvec2 arg_1 = uvec2(0u); - vec4 arg_2 = vec4(0.0f); + uvec2 arg_1 = uvec2(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl index f19febe053..e69790ba12 100644 --- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_7cf6e7(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - float4 arg_2 = float4(0.0f); + uint2 arg_1 = uint2(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm index d303e8fbaf..78fb718aba 100644 --- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_7cf6e7 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_7cf6e7 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_7cf6e7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_7cf6e7 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_7cf6e7 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_7cf6e7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl index f93f1a0fba..4300c7dba1 100644 --- a/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7cf6e7.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_7cf6e7() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl index 247b97c778..6357ca212a 100644 --- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_7f7fae() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl index 6d80e547de..5cdb0c0cf1 100644 --- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_7f7fae() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl index 6d80e547de..5cdb0c0cf1 100644 --- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_7f7fae() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl index a991af17f1..9b457ce721 100644 --- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_7f7fae(texture1d tint_symbol_1) { int arg_1 = 1; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.spvasm index aace840d49..2727ee4114 100644 --- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_7f7fae = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %int_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %int %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_7f7fae +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_7f7fae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_7f7fae + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_7f7fae OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_7f7fae + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_7f7fae OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl index 9815899604..b36d9e0cbc 100644 --- a/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/7f7fae.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_7f7fae() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl index f2bae965ef..be1271ab83 100644 --- a/test/tint/builtins/gen/var/textureStore/804942.wgsl +++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_804942() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl index f2f0dd3b7d..e663487977 100644 --- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_804942() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl index f2f0dd3b7d..e663487977 100644 --- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_804942() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl index e99ccc58e4..9cf56e031c 100644 --- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_804942() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl index d2e755d720..3d5af50d0b 100644 --- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_804942(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - int4 arg_2 = int4(0); + int2 arg_1 = int2(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.spvasm index b6cc2c9c14..a48d00627a 100644 --- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_804942 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_804942 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_804942 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_804942 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_804942 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_804942 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl index 171f2496e5..ab6fef7c3e 100644 --- a/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/804942.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_804942() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl index d38a59f17a..96b5ec1c5a 100644 --- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl +++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_805dae() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl index b251d9f807..36697f9e8d 100644 --- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_805dae() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl index b251d9f807..36697f9e8d 100644 --- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_805dae() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl index 77e3041e20..76c472a057 100644 --- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image2D arg_0; void textureStore_805dae() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl index 8ba8e4802e..a516aafd8a 100644 --- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_805dae(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - float4 arg_2 = float4(0.0f); + int2 arg_1 = int2(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.spvasm index 0bcb46d765..9dc18fa281 100644 --- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_805dae = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_805dae +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_805dae OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_805dae - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_805dae OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_805dae + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl index 3e6f446db3..4c2b4c3f83 100644 --- a/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/805dae.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_805dae() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl index 58dc1d8bdd..e0476d9b4d 100644 --- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl +++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_83bcc1() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl index b606a3a1ab..cd2263431e 100644 --- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_83bcc1() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl index b606a3a1ab..cd2263431e 100644 --- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_83bcc1() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl index bf59f21af9..d1016d0837 100644 --- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_83bcc1(texture1d tint_symbol_1) { int arg_1 = 1; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm index da8b6bf230..8bd3f62af8 100644 --- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -46,41 +46,43 @@ %_ptr_Function_int = OpTypePointer Function %int %21 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_83bcc1 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %21 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 OpStore %arg_1 %int_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %int %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_83bcc1 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_83bcc1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_83bcc1 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_83bcc1 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_83bcc1 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_83bcc1 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl index 7625aa6827..eec57a43ac 100644 --- a/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/83bcc1.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_83bcc1() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl index a48109e640..71d6bebf90 100644 --- a/test/tint/builtins/gen/var/textureStore/872747.wgsl +++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_872747() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl index 9c937a509e..d70ea2745d 100644 --- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_872747() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl index 9c937a509e..d70ea2745d 100644 --- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_872747() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl index fcb5caa91f..0306531e1a 100644 --- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_872747(texture1d tint_symbol_1) { int arg_1 = 1; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.spvasm index a197ec4bcc..8d8d31a98a 100644 --- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,40 +44,41 @@ %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_872747 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %int_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %int %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_872747 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_872747 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_872747 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_872747 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_872747 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_872747 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl index 34d6be285a..32ed1eb6e4 100644 --- a/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/872747.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_872747() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl index 5c1529aeaa..89240933c6 100644 --- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_8b9310() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl index 63e02b9a74..9be824a94d 100644 --- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8b9310() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl index 63e02b9a74..9be824a94d 100644 --- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8b9310() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl index 07179e6f0f..01aa711b49 100644 --- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_8b9310() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl index a56cd43d1f..43ca7a4e16 100644 --- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_8b9310(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - float4 arg_2 = float4(0.0f); + uint3 arg_1 = uint3(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm index 6dcd46e11b..c9202067bf 100644 --- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_8b9310 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_8b9310 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8b9310 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_8b9310 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_8b9310 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_8b9310 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl index f4095ead3b..aa7459572e 100644 --- a/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8b9310.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_8b9310() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl index 4798b48455..cf485b666b 100644 --- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_8bb287() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl index 69cee8ca32..a21698e8e8 100644 --- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8bb287() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl index 69cee8ca32..a21698e8e8 100644 --- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8bb287() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl index 88ef4d60db..0fd9536ca1 100644 --- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_8bb287() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl index f5202e74dd..576d3df849 100644 --- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_8bb287(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm index 1c82ad558e..e21dcae18d 100644 --- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8bb287 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %36 = OpLoad %uint %arg_2 - %37 = OpCompositeConstruct %v3uint %34 %35 %36 - %38 = OpLoad %v4int %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %39 = OpLoad %uint %arg_2 + %40 = OpCompositeConstruct %v3uint %37 %38 %39 + %41 = OpLoad %v4int %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_8bb287 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_8bb287 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_8bb287 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_8bb287 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_8bb287 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl index a8e7a968a9..11d1d8f47a 100644 --- a/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8bb287.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_8bb287() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl index d5510a92ee..df2a149cfc 100644 --- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_8c76e9() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl index 94d7ce990a..6facd77dd2 100644 --- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_8c76e9() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl index 94d7ce990a..6facd77dd2 100644 --- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_8c76e9() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl index c5331dd382..08136cd7f0 100644 --- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_8c76e9(texture1d tint_symbol_1) { uint arg_1 = 1u; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm index dff91f3551..d1b88d33c4 100644 --- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_uint = OpTypePointer Function %uint %21 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8c76e9 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %21 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 OpStore %arg_1 %uint_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %uint %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_8c76e9 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_8c76e9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_8c76e9 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_8c76e9 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_8c76e9 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_8c76e9 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl index 41c78a312a..8b5ce79d11 100644 --- a/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8c76e9.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_8c76e9() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl index ea6156b60e..f17830e7bb 100644 --- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_8dc54f() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl index 9356f2bedf..306c254590 100644 --- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_8dc54f() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl index 9356f2bedf..306c254590 100644 --- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_8dc54f() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl index c73663238f..53f7885225 100644 --- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2D arg_0; void textureStore_8dc54f() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl index a4b43c5948..4655fade57 100644 --- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_8dc54f(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - uint4 arg_2 = uint4(0u); + uint2 arg_1 = uint2(1u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm index f6c0c9d4f3..5f5ada387e 100644 --- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8dc54f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_8dc54f +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_8dc54f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_8dc54f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_8dc54f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_8dc54f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl index 45a3bce186..a655b361ac 100644 --- a/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8dc54f.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_8dc54f() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl index 3920a85a43..96639ece98 100644 --- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_8e0479() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl index 24d93ef7cf..e3875a4120 100644 --- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8e0479() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl index 24d93ef7cf..e3875a4120 100644 --- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8e0479() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl index 0a78791db4..d070bb9dc9 100644 --- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8e0479() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl index 6ad4aba381..9634e28ed2 100644 --- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_8e0479(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm index baca5da445..e891980687 100644 --- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8e0479 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %36 = OpLoad %int %arg_2 - %37 = OpCompositeConstruct %v3int %34 %35 %36 - %38 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %39 = OpLoad %int %arg_2 + %40 = OpCompositeConstruct %v3int %37 %38 %39 + %41 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_8e0479 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_8e0479 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_8e0479 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_8e0479 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_8e0479 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl index 62cc919039..bc566613a3 100644 --- a/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8e0479.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_8e0479() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl index cadc370b8a..963166af1a 100644 --- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_8ed9f8() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl index 0660af50d0..b187376dc7 100644 --- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8ed9f8() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl index 0660af50d0..b187376dc7 100644 --- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8ed9f8() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl index 1f7cd6b56c..be631e3386 100644 --- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8) uniform highp writeonly image3D arg_0; void textureStore_8ed9f8() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl index bb463d3d00..ee9605171a 100644 --- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_8ed9f8(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - float4 arg_2 = float4(0.0f); + uint3 arg_1 = uint3(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm index f6fe75a3b2..2ee7bf3165 100644 --- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_8ed9f8 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_8ed9f8 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_8ed9f8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_8ed9f8 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_8ed9f8 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_8ed9f8 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl index b650269cfe..77a7d5002b 100644 --- a/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8ed9f8.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_8ed9f8() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl index dd7f731af1..12d406f318 100644 --- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_8f71a1() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl index 513e3775f0..dfdbda8fdf 100644 --- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8f71a1() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl index 513e3775f0..dfdbda8fdf 100644 --- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_8f71a1() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl index ebb51a8ba0..90fded8739 100644 --- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16i) uniform highp writeonly iimage3D arg_0; void textureStore_8f71a1() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl index bf5a54ee48..b3277b9449 100644 --- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_8f71a1(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - int4 arg_2 = int4(0); + int3 arg_1 = int3(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.spvasm index 14926980e7..2b0617880f 100644 --- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8f71a1 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v3int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_8f71a1 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_8f71a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_8f71a1 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_8f71a1 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_8f71a1 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl index 709f78ea49..ff0e20c032 100644 --- a/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8f71a1.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_8f71a1() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl index 9c6fc3ebfd..79cf93082b 100644 --- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_8ff674() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl index 4265f0cb6d..ade6cd2997 100644 --- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8ff674() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl index 4265f0cb6d..ade6cd2997 100644 --- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_8ff674() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl index cf082e9ae7..4934abca2c 100644 --- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_8ff674() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl index 051723b3d0..e7e60b1f37 100644 --- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_8ff674(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm index 768cb937bc..ef45f7e78f 100644 --- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_8ff674 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_8ff674 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_8ff674 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_8ff674 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_8ff674 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_8ff674 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl index dc5d1f2286..405abd55ee 100644 --- a/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/8ff674.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_8ff674() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl index 6548f0e619..0d1dcd62e1 100644 --- a/test/tint/builtins/gen/var/textureStore/958353.wgsl +++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_958353() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl index 07fc6aa9f5..61de8625e7 100644 --- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_958353() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl index 07fc6aa9f5..61de8625e7 100644 --- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_958353() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl index bad5668e7a..d1fcf04ccd 100644 --- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_958353(texture1d tint_symbol_1) { uint arg_1 = 1u; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm index bc9952964c..41534d4b02 100644 --- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_uint = OpTypePointer Function %uint %21 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_958353 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %21 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 OpStore %arg_1 %uint_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %uint %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_958353 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_958353 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_958353 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_958353 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_958353 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_958353 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl index 3da04740b6..436e67bf08 100644 --- a/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/958353.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_958353() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl index 404fd196e1..37080fa89f 100644 --- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl +++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_959d94() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl index 807d0de96d..9119e4a803 100644 --- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_959d94() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl index 807d0de96d..9119e4a803 100644 --- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_959d94() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl index bd790afdc2..515eff233b 100644 --- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_959d94(texture1d tint_symbol_1) { uint arg_1 = 1u; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm index 33e3eab8d0..f40074f50d 100644 --- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_959d94 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %uint_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %uint %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_959d94 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_959d94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_959d94 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_959d94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_959d94 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_959d94 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl index d9300eb51b..1c4d7e252f 100644 --- a/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/959d94.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_959d94() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl index 0b1037db52..e93a9333f1 100644 --- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl +++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_95e452() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl index e602baef8b..980ad86f52 100644 --- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_95e452() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl index e602baef8b..980ad86f52 100644 --- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_95e452() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl index e25384d1ba..64f694f586 100644 --- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32i) uniform highp writeonly iimage2D arg_0; void textureStore_95e452() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl index ce3297bb56..3326a49ffc 100644 --- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_95e452(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - int4 arg_2 = int4(0); + uint2 arg_1 = uint2(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm index 1fd3674b58..04c19d1a79 100644 --- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_95e452 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_95e452 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_95e452 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_95e452 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_95e452 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_95e452 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_95e452 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl index 6eaf3fa91e..ab3968fbbb 100644 --- a/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/95e452.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_95e452() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl index ee132a7c75..be1ee39809 100644 --- a/test/tint/builtins/gen/var/textureStore/969534.wgsl +++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_969534() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl index abe1eac2a2..105c863db0 100644 --- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_969534() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl index abe1eac2a2..105c863db0 100644 --- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_969534() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl index aed04dd167..ce5ff518cf 100644 --- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_969534(texture1d tint_symbol_1) { int arg_1 = 1; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm index 74def9c76e..475896e65d 100644 --- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4int + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_969534 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %25 OpStore %arg_1 %int_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %int %arg_1 + %29 = OpLoad %v4int %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_969534 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_969534 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_969534 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_969534 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_969534 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_969534 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl index 259cbc8610..df5ca1d34e 100644 --- a/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/969534.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_969534() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl index bbd789cb3f..c722fc75fc 100644 --- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_9938b7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl index 80692a91dd..392499e990 100644 --- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9938b7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl index 80692a91dd..392499e990 100644 --- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9938b7() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl index 3a267d7c10..d95242f4ef 100644 --- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32i) uniform highp writeonly iimage2DArray arg_0; void textureStore_9938b7() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl index 2a674761c1..5ebe2acc4d 100644 --- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_9938b7(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm index 38749618e1..35871f0d4a 100644 --- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,56 +41,59 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9938b7 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_9938b7 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_9938b7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_9938b7 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_9938b7 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_9938b7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl index b2c33766f1..a4045a5b9e 100644 --- a/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9938b7.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9938b7() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl index d732945f6f..add0fbc574 100644 --- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_9a3ecc() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl index f6dae1cba2..0225f3a87f 100644 --- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_9a3ecc() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl index f6dae1cba2..0225f3a87f 100644 --- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_9a3ecc() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl index 9beb825420..70c00a699b 100644 --- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32i) uniform highp writeonly iimage3D arg_0; void textureStore_9a3ecc() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl index 44b8e33d0c..9c2fa4012e 100644 --- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_9a3ecc(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - int4 arg_2 = int4(0); + int3 arg_1 = int3(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.spvasm index 7b6db7c21b..5548c20524 100644 --- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9a3ecc = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v3int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_9a3ecc +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_9a3ecc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_9a3ecc - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_9a3ecc OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_9a3ecc + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl index 04f9424c83..a64c7b30f0 100644 --- a/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9a3ecc.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_9a3ecc() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl index fd44463e77..43c26e51eb 100644 --- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_9d8668() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl index 0ad43ef0e2..20c597ca03 100644 --- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d8668() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl index 0ad43ef0e2..20c597ca03 100644 --- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d8668() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl index 5600dbe1c1..27ef778c79 100644 --- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8) uniform highp writeonly image2DArray arg_0; void textureStore_9d8668() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl index e0efa79b88..7bbee65bf5 100644 --- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_9d8668(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.spvasm index 8c3095c1bc..aa6a4d3db3 100644 --- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_9d8668 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_9d8668 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_9d8668 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_9d8668 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_9d8668 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_9d8668 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl index b04ebc4256..52419337a9 100644 --- a/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9d8668.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9d8668() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl index 46518d6a6c..68cd648506 100644 --- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_9d9cd5() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl index 63531a6046..4451b9d1bf 100644 --- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d9cd5() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl index 63531a6046..4451b9d1bf 100644 --- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9d9cd5() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl index 05a0d53f2d..7bd328dbf7 100644 --- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32f) uniform highp writeonly image2DArray arg_0; void textureStore_9d9cd5() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl index 48036cda82..b9e24ad117 100644 --- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_9d9cd5(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm index 9e3237055b..4c7a24240d 100644 --- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_9d9cd5 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %36 = OpLoad %int %arg_2 + %37 = OpCompositeConstruct %v3int %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_9d9cd5 +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_9d9cd5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_9d9cd5 + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_9d9cd5 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_9d9cd5 + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_9d9cd5 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl index e34f0eb07a..4d43460274 100644 --- a/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9d9cd5.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9d9cd5() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl index 8175a48290..859fd3cf81 100644 --- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_9e3ec5() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl index 0c02acb52b..22ca488ad2 100644 --- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9e3ec5() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl index 0c02acb52b..22ca488ad2 100644 --- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9e3ec5() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl index 19ace0b4cb..33a744d489 100644 --- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_9e3ec5() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl index 942418d022..2c1da1deb3 100644 --- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_9e3ec5(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - int4 arg_2 = int4(0); + int2 arg_1 = int2(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.spvasm index 4ce3d9ee19..e2c8e6469c 100644 --- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9e3ec5 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_9e3ec5 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_9e3ec5 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_9e3ec5 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_9e3ec5 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_9e3ec5 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl index a8259239b9..786a00040c 100644 --- a/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9e3ec5.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_9e3ec5() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl index 46cfbcb1f0..fa9d76b3e8 100644 --- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_9f5318() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl index 68caac19c9..db1e551a13 100644 --- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9f5318() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl index 68caac19c9..db1e551a13 100644 --- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_9f5318() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl index 190288bd18..58486e786a 100644 --- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_9f5318(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - int4 arg_2 = int4(0); + uint2 arg_1 = uint2(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm index 821ca97285..93dec970f2 100644 --- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,44 +42,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9f5318 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_9f5318 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_9f5318 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_9f5318 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_9f5318 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_9f5318 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_9f5318 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl index 1ab319cc44..1b711aeb9b 100644 --- a/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9f5318.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_9f5318() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl index dc0293832c..0ed254595f 100644 --- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_9f7cea() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl index 9decbcde32..c06bbdff06 100644 --- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9f7cea() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl index 9decbcde32..c06bbdff06 100644 --- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_9f7cea() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl index a561d875f2..a429114dca 100644 --- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_9f7cea() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl index c6000bd60a..0b17dac9f9 100644 --- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_9f7cea(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm index 71767cd339..d6a2eedc10 100644 --- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_9f7cea = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_9f7cea +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_9f7cea OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_9f7cea - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_9f7cea OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_9f7cea + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl index 6b559818cb..c8cceff1da 100644 --- a/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/9f7cea.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_9f7cea() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl index 7ff74cd91e..2088a746ad 100644 --- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_a0f96e() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl index 97ab824239..24a137edd3 100644 --- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a0f96e() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl index 97ab824239..24a137edd3 100644 --- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a0f96e() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl index 276a6f943b..fe822538f0 100644 --- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a0f96e() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl index 03c6f52186..8d5db8688d 100644 --- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_a0f96e(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm index 5277c6c59b..b04517c165 100644 --- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,52 +41,54 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_a0f96e = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2uint %arg_1 - %31 = OpCompositeExtract %uint %30 0 - %32 = OpCompositeExtract %uint %30 1 - %33 = OpLoad %uint %arg_2 - %34 = OpCompositeConstruct %v3uint %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2uint %arg_1 + %34 = OpCompositeExtract %uint %33 0 + %35 = OpCompositeExtract %uint %33 1 + %36 = OpLoad %uint %arg_2 + %37 = OpCompositeConstruct %v3uint %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_a0f96e +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_a0f96e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_a0f96e + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_a0f96e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_a0f96e + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_a0f96e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl index d9babfe036..7ed7210f87 100644 --- a/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a0f96e.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a0f96e() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl index d2c748361d..4be46e81ce 100644 --- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_a1352c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl index f9c55582a4..c9ae03c14a 100644 --- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a1352c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl index f9c55582a4..c9ae03c14a 100644 --- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a1352c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl index 8d0b0508d8..fba754f349 100644 --- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_a1352c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl index 275794f5a2..2eecb90580 100644 --- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_a1352c(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm index 60d21143e5..b6dc94defb 100644 --- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a1352c = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %36 = OpLoad %uint %arg_2 - %37 = OpCompositeConstruct %v3uint %34 %35 %36 - %38 = OpLoad %v4int %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %39 = OpLoad %uint %arg_2 + %40 = OpCompositeConstruct %v3uint %37 %38 %39 + %41 = OpLoad %v4int %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_a1352c +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_a1352c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_a1352c - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_a1352c OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_a1352c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl index 7132f14f30..09746863a9 100644 --- a/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a1352c.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a1352c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl index ded9f8e8c9..dc78645238 100644 --- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_a4c338() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl index fbaa791536..6f5fbf182c 100644 --- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a4c338() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl index fbaa791536..6f5fbf182c 100644 --- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a4c338() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl index f4ae68ce79..5643f1703e 100644 --- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_a4c338(texture1d tint_symbol_1) { uint arg_1 = 1u; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm index 3ff8ca1a3c..d92f716983 100644 --- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_a4c338 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %uint_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %uint %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_a4c338 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_a4c338 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_a4c338 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_a4c338 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_a4c338 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_a4c338 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl index 49ef5505bb..96e6f1a122 100644 --- a/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a4c338.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_a4c338() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl index 34851f61cd..7e5099f2ef 100644 --- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_a5e80d() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl index 89f734c9dc..1a1241ae47 100644 --- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_a5e80d() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl index 89f734c9dc..1a1241ae47 100644 --- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_a5e80d() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl index 0bf35075ab..a694566bc1 100644 --- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32f) uniform highp writeonly image3D arg_0; void textureStore_a5e80d() { - uvec3 arg_1 = uvec3(0u); - vec4 arg_2 = vec4(0.0f); + uvec3 arg_1 = uvec3(1u); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl index 09345d45f1..e00f52f600 100644 --- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_a5e80d(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - float4 arg_2 = float4(0.0f); + uint3 arg_1 = uint3(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm index fc7f43eba7..4833576cbb 100644 --- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_a5e80d = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_a5e80d +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_a5e80d OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_a5e80d - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_a5e80d OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_a5e80d + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl index 39765799e7..61026f0836 100644 --- a/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a5e80d.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_a5e80d() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl index 45715a3c90..8b6da07b44 100644 --- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_a6a986() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl index 87243b7b05..5102816733 100644 --- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a6a986() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl index 87243b7b05..5102816733 100644 --- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a6a986() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl index 63d69b050b..2249883a6c 100644 --- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16f) uniform highp writeonly image2DArray arg_0; void textureStore_a6a986() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl index b331c2d2a1..e4fa7fa82f 100644 --- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_a6a986(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.spvasm index e1eee7c895..418614218b 100644 --- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_a6a986 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_a6a986 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_a6a986 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_a6a986 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_a6a986 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_a6a986 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl index 5ca9a0102b..eae1eee7e6 100644 --- a/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a6a986.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a6a986() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl index ee01fa7f9b..fc02f9f42c 100644 --- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_a6e78f() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl index 1bcd8218dd..0314856ec7 100644 --- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a6e78f() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl index 1bcd8218dd..0314856ec7 100644 --- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_a6e78f() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl index c8eae4cfb0..07ee9e6d9e 100644 --- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_a6e78f(texture1d tint_symbol_1) { uint arg_1 = 1u; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm index 87994819c3..85835b1b9f 100644 --- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4uint + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a6e78f = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %25 OpStore %arg_1 %uint_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %uint %arg_1 + %29 = OpLoad %v4uint %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_a6e78f +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_a6e78f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_a6e78f + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_a6e78f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_a6e78f + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_a6e78f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl index 5c8eedc4fa..182f6be080 100644 --- a/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a6e78f.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_a6e78f() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl index 0613670ae8..4560e16a44 100644 --- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_a9426c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl index d8b282f80b..7e1d84761f 100644 --- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a9426c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl index d8b282f80b..7e1d84761f 100644 --- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_a9426c() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl index 8289c230ab..61410c5ef8 100644 --- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_a9426c() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl index d04e4a7054..cd1bca4392 100644 --- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_a9426c(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm index 51c831c446..e9d783b085 100644 --- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %30 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_a9426c = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2uint %arg_1 - %33 = OpCompositeExtract %uint %32 0 - %34 = OpCompositeExtract %uint %32 1 - %35 = OpLoad %uint %arg_2 - %36 = OpCompositeConstruct %v3uint %33 %34 %35 - %37 = OpLoad %v4uint %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2uint %arg_1 + %35 = OpCompositeExtract %uint %34 0 + %36 = OpCompositeExtract %uint %34 1 + %37 = OpLoad %uint %arg_2 + %38 = OpCompositeConstruct %v3uint %35 %36 %37 + %39 = OpLoad %v4uint %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_a9426c +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_a9426c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_a9426c + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_a9426c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_a9426c + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_a9426c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl index 32f329d901..457d2be43b 100644 --- a/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/a9426c.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_a9426c() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl index e92ea384ea..8fb06fb97b 100644 --- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl +++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ac67aa() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl index b36799d5e1..4ff2367a54 100644 --- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ac67aa() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl index b36799d5e1..4ff2367a54 100644 --- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ac67aa() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl index bff5a97664..04fa0ba870 100644 --- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_ac67aa(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - uint4 arg_2 = uint4(0u); + int3 arg_1 = int3(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm index df550ab8db..4fe2977f1c 100644 --- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,44 +42,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %23 = OpConstantNull %v3int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_ac67aa = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_ac67aa +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_ac67aa OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_ac67aa + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_ac67aa OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_ac67aa + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_ac67aa OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl index 2145e3ae82..e6d0f6328c 100644 --- a/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/ac67aa.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ac67aa() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl index 30430d6fef..feace1bfd1 100644 --- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl +++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_aeb38a() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl index 66013e5300..63340ad7e7 100644 --- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_aeb38a() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl index 66013e5300..63340ad7e7 100644 --- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_aeb38a() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl index adbba2ad64..dc43e689b4 100644 --- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba32ui) uniform highp writeonly uimage2D arg_0; void textureStore_aeb38a() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl index d8e7b55f30..bf395537b7 100644 --- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_aeb38a(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - uint4 arg_2 = uint4(0u); + uint2 arg_1 = uint2(1u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm index 5e539c66f4..4a04967f62 100644 --- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_aeb38a = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_aeb38a +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_aeb38a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_aeb38a - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_aeb38a OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_aeb38a + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl index 588457ca1e..cacf704b20 100644 --- a/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/aeb38a.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_aeb38a() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl index 68a682b9ad..c98d5f7c98 100644 --- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_b42fd3() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl index 9088ca1a96..a6cb47a4f3 100644 --- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_b42fd3() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl index 9088ca1a96..a6cb47a4f3 100644 --- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_b42fd3() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl index 55586e2f4d..3cf8367aa3 100644 --- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_b42fd3() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl index 9896b0361e..1f5972dd41 100644 --- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_b42fd3(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm index 9e42c7c4f2..09ccb9df5b 100644 --- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %24 = OpConstantNull %uint + %25 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %26 = OpConstantNull %v4uint + %27 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %30 = OpConstantNull %v4uint %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b42fd3 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %24 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2uint %arg_1 - %33 = OpCompositeExtract %uint %32 0 - %34 = OpCompositeExtract %uint %32 1 - %35 = OpLoad %uint %arg_2 - %36 = OpCompositeConstruct %v3uint %33 %34 %35 - %37 = OpLoad %v4uint %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2uint %arg_1 + %35 = OpCompositeExtract %uint %34 0 + %36 = OpCompositeExtract %uint %34 1 + %37 = OpLoad %uint %arg_2 + %38 = OpCompositeConstruct %v3uint %35 %36 %37 + %39 = OpLoad %v4uint %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_b42fd3 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_b42fd3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_b42fd3 + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_b42fd3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_b42fd3 + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_b42fd3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl index d150b77744..3619cb13ed 100644 --- a/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b42fd3.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_b42fd3() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl index c0eedb2522..b0fa1ca7cf 100644 --- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_b706b1() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl index 4e961147c9..bc4e46f54b 100644 --- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_b706b1() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl index 4e961147c9..bc4e46f54b 100644 --- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_b706b1() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl index 72e03e7354..f8c512a93c 100644 --- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_b706b1() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl index 635cb6c0f1..fed5f14ecd 100644 --- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_b706b1(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - int4 arg_2 = int4(0); + int3 arg_1 = int3(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.spvasm index 32c2bcb935..363567eb63 100644 --- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b706b1 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v3int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_b706b1 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_b706b1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_b706b1 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_b706b1 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_b706b1 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl index 42775a482a..97673b35d2 100644 --- a/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b706b1.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_b706b1() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl index ece1d5fcff..50126bace2 100644 --- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_b70ded() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl index d754d63284..522ce4ebe4 100644 --- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b70ded() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl index d754d63284..522ce4ebe4 100644 --- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b70ded() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl index 3a431a5e09..6256f77ff4 100644 --- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_b70ded(texture1d tint_symbol_1) { uint arg_1 = 1u; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm index a62ffee117..5beaa6b290 100644 --- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4uint + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b70ded = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %25 OpStore %arg_1 %uint_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %uint %arg_1 + %29 = OpLoad %v4uint %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_b70ded +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_b70ded OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_b70ded + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_b70ded OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_b70ded + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_b70ded OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl index 890424d585..165633c8f8 100644 --- a/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b70ded.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_b70ded() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl index 7384312fe2..3e35e34bbe 100644 --- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_b76ff3() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl index 8314e19b3f..520d0cf3fc 100644 --- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_b76ff3() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl index 8314e19b3f..520d0cf3fc 100644 --- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_b76ff3() { - uint2 arg_1 = (0u).xx; - int4 arg_2 = (0).xxxx; + uint2 arg_1 = (1u).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl index 70f8711835..2357f24d02 100644 --- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2D arg_0; void textureStore_b76ff3() { - uvec2 arg_1 = uvec2(0u); - ivec4 arg_2 = ivec4(0); + uvec2 arg_1 = uvec2(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl index 27f65cd637..c60afc39a9 100644 --- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_b76ff3(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - int4 arg_2 = int4(0); + uint2 arg_1 = uint2(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm index 0c8dff4f5c..600e596f21 100644 --- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b76ff3 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v2uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v2uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_b76ff3 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_b76ff3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_b76ff3 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_b76ff3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_b76ff3 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_b76ff3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl index 31d8eb61ee..590b81a45e 100644 --- a/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b76ff3.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_b76ff3() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl index 521cf71777..35f54baade 100644 --- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_b77161() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl index fbf5804495..db1ca7edcd 100644 --- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b77161() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl index fbf5804495..db1ca7edcd 100644 --- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_b77161() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl index dbc84ef794..2b93c27f82 100644 --- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_b77161(texture1d tint_symbol_1) { uint arg_1 = 1u; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm index 877baaa125..743b5c735b 100644 --- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,42 @@ %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4uint + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_b77161 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %25 OpStore %arg_1 %uint_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %uint %arg_1 + %29 = OpLoad %v4uint %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_b77161 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_b77161 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_b77161 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_b77161 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_b77161 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_b77161 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl index 77b02dc913..1d7c24ff66 100644 --- a/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/b77161.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_b77161() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl index a15240cee9..90ca4dbb7a 100644 --- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_bbcb7f() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl index 366a2e7824..edf7f919f5 100644 --- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_bbcb7f() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl index 366a2e7824..edf7f919f5 100644 --- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_bbcb7f() { - int2 arg_1 = (0).xx; - int4 arg_2 = (0).xxxx; + int2 arg_1 = (1).xx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl index 2b486d8fb8..73c6c3cce5 100644 --- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2D arg_0; void textureStore_bbcb7f() { - ivec2 arg_1 = ivec2(0); - ivec4 arg_2 = ivec4(0); + ivec2 arg_1 = ivec2(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl index 0a942853e1..16f0357507 100644 --- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_bbcb7f(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - int4 arg_2 = int4(0); + int2 arg_1 = int2(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.spvasm index 59e7b74967..f3aaa71bb2 100644 --- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_bbcb7f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_bbcb7f +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_bbcb7f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_bbcb7f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_bbcb7f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_bbcb7f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl index 1bf17d91d7..1fa51e6c17 100644 --- a/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/bbcb7f.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_bbcb7f() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl index 340cf9ea12..abb928bf95 100644 --- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl +++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_be6e30() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl index 67ff8b2119..743fdfdec5 100644 --- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_be6e30() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl index 67ff8b2119..743fdfdec5 100644 --- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_be6e30() { - int2 arg_1 = (0).xx; - float4 arg_2 = (0.0f).xxxx; + int2 arg_1 = (1).xx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl index 95fa82c8a4..17fe18e9c4 100644 --- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16f) uniform highp writeonly image2D arg_0; void textureStore_be6e30() { - ivec2 arg_1 = ivec2(0); - vec4 arg_2 = vec4(0.0f); + ivec2 arg_1 = ivec2(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl index ad189e0815..87c31cb6c2 100644 --- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_be6e30(texture2d tint_symbol_1) { - int2 arg_1 = int2(0); - float4 arg_2 = float4(0.0f); + int2 arg_1 = int2(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.spvasm index 57d0a8caaa..e9e61498e7 100644 --- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v2int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_be6e30 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v2int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v2int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_be6e30 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_be6e30 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_be6e30 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_be6e30 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_be6e30 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl index 3fa9fde298..523c97d5a7 100644 --- a/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/be6e30.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_be6e30() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl index d6c70e71b1..dcea5ed09f 100644 --- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl +++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_bf775c() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl index c75cb0ba5b..f4a3b244d8 100644 --- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_bf775c() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl index c75cb0ba5b..f4a3b244d8 100644 --- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_bf775c() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl index 24079fd3d6..b918a1f330 100644 --- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_bf775c(texture1d tint_symbol_1) { int arg_1 = 1; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm index c699fc002a..d9b443881a 100644 --- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4int + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_bf775c = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %25 OpStore %arg_1 %int_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %int %arg_1 + %29 = OpLoad %v4int %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_bf775c +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_bf775c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_bf775c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_bf775c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_bf775c + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_bf775c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl index fd241093ab..d9e173e56f 100644 --- a/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/bf775c.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_bf775c() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl index f2dbc70201..b36ad4c6e5 100644 --- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_c1f29e() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl index 36eb25d907..aa5385df48 100644 --- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_c1f29e() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl index 36eb25d907..aa5385df48 100644 --- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_c1f29e() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl index b3fdc8a840..b90cc9c62d 100644 --- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_c1f29e(texture1d tint_symbol_1) { uint arg_1 = 1u; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm index 183f38caae..937da1315c 100644 --- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_c1f29e = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %uint_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %uint %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_c1f29e +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_c1f29e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_c1f29e + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_c1f29e OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_c1f29e + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_c1f29e OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl index 9d3ff1a02d..b302fbe9e8 100644 --- a/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c1f29e.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_c1f29e() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl index 91424c5466..4a31b499a4 100644 --- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_c2ca46() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl index ab57f4a33c..de55098de3 100644 --- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c2ca46() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl index ab57f4a33c..de55098de3 100644 --- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c2ca46() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; uint arg_2 = 1u; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl index 5f6b0bed56..2786286c9e 100644 --- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c2ca46() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); uint arg_2 = 1u; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl index ea9becc850..711aa8eefc 100644 --- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_c2ca46(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); uint arg_2 = 1u; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm index 5992bcf16b..9824af5923 100644 --- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,54 +42,57 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint -%_ptr_Function_v2uint = OpTypePointer Function %v2uint %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 +%_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %26 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_c2ca46 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %26 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %36 = OpLoad %uint %arg_2 - %37 = OpCompositeConstruct %v3uint %34 %35 %36 - %38 = OpLoad %v4int %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %39 = OpLoad %uint %arg_2 + %40 = OpCompositeConstruct %v3uint %37 %38 %39 + %41 = OpLoad %v4int %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_c2ca46 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_c2ca46 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_c2ca46 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_c2ca46 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_c2ca46 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl index 1028c6718f..621ebe89b4 100644 --- a/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c2ca46.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_c2ca46() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl index 759c4b3604..fd1154720a 100644 --- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_c32905() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl index 4d99be6d3c..060ff84a05 100644 --- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c32905() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl index 4d99be6d3c..060ff84a05 100644 --- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c32905() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl index 4a695bb1f4..b7b208a944 100644 --- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_c32905() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl index 52e8a0264e..59fd22c1ec 100644 --- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_c32905(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm index 48e2220753..6b25e8cfec 100644 --- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %19 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %23 = OpConstantNull %v2uint %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %27 = OpConstantNull %v4int + %29 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %32 = OpConstantNull %v4int %v3uint = OpTypeVector %uint 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_c32905 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4int Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %27 + %arg_3 = OpVariable %_ptr_Function_v4int Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2uint %arg_1 - %34 = OpCompositeExtract %uint %33 0 - %35 = OpCompositeExtract %uint %33 1 - %37 = OpLoad %int %arg_2 - %36 = OpBitcast %uint %37 - %38 = OpCompositeConstruct %v3uint %34 %35 %36 - %39 = OpLoad %v4int %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2uint %arg_1 + %37 = OpCompositeExtract %uint %36 0 + %38 = OpCompositeExtract %uint %36 1 + %40 = OpLoad %int %arg_2 + %39 = OpBitcast %uint %40 + %41 = OpCompositeConstruct %v3uint %37 %38 %39 + %42 = OpLoad %v4int %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_c32905 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_c32905 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_c32905 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_c32905 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_c32905 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl index 73f1d99539..d8002b486e 100644 --- a/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c32905.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_c32905() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl index 3f51529a70..4f58ba397f 100644 --- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_c5af1e() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl index c52db8f8be..f92b8f6faa 100644 --- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_c5af1e() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl index c52db8f8be..f92b8f6faa 100644 --- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_c5af1e() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl index d75b39b00c..cd1558adc7 100644 --- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16f) uniform highp writeonly image3D arg_0; void textureStore_c5af1e() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl index 6e9206f482..1abb31005d 100644 --- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_c5af1e(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - float4 arg_2 = float4(0.0f); + int3 arg_1 = int3(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.spvasm index 0a7e6556eb..cbb579c4c0 100644 --- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_c5af1e = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_c5af1e +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_c5af1e OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_c5af1e - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_c5af1e OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_c5af1e + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl index cc2c9d11da..71ea84055a 100644 --- a/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c5af1e.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_c5af1e() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl index ce4bcc6fa2..e42fa06b19 100644 --- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_c863be() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl index bf1dd2cb3c..d755997be0 100644 --- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c863be() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl index bf1dd2cb3c..d755997be0 100644 --- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_c863be() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl index 3b4ee66666..3b0b4523cb 100644 --- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_c863be(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm index 49ae3b6aa5..5787add677 100644 --- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 50 +; Bound: 52 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,52 +42,54 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %27 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %36 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %39 = OpTypeFunction %v4float %textureStore_c863be = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %28 = OpLoad %11 %arg_0 - %30 = OpLoad %v2int %arg_1 - %31 = OpCompositeExtract %int %30 0 - %32 = OpCompositeExtract %int %30 1 - %33 = OpLoad %int %arg_2 - %34 = OpCompositeConstruct %v3int %31 %32 %33 - %35 = OpLoad %v4float %arg_3 - OpImageWrite %28 %34 %35 + OpStore %arg_3 %27 + %31 = OpLoad %11 %arg_0 + %33 = OpLoad %v2int %arg_1 + %34 = OpCompositeExtract %int %33 0 + %35 = OpCompositeExtract %int %33 1 + %36 = OpLoad %int %arg_2 + %37 = OpCompositeConstruct %v3int %34 %35 %36 + %38 = OpLoad %v4float %arg_3 + OpImageWrite %31 %37 %38 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %36 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_c863be +%vertex_main_inner = OpFunction %v4float None %39 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_c863be OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %41 = OpLabel - %42 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %42 + %44 = OpLabel + %45 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %45 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %45 = OpLabel - %46 = OpFunctionCall %void %textureStore_c863be + %47 = OpLabel + %48 = OpFunctionCall %void %textureStore_c863be OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_c863be + %50 = OpLabel + %51 = OpFunctionCall %void %textureStore_c863be OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl index ca615c5ba6..22fc708a1c 100644 --- a/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/c863be.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_c863be() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl index 92e3678a16..d8b0fc589a 100644 --- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl +++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_cb3b0b() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl index 6f20c68902..158f60c19c 100644 --- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_cb3b0b() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl index 6f20c68902..158f60c19c 100644 --- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_cb3b0b() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl index 96f8c655c2..9b2d5e6375 100644 --- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8i) uniform highp writeonly iimage3D arg_0; void textureStore_cb3b0b() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl index 4b6e1617f4..c3fa3cea34 100644 --- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_cb3b0b(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - int4 arg_2 = int4(0); + uint3 arg_1 = uint3(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm index 363baf6c5c..0c3ca7871f 100644 --- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %23 = OpConstantNull %v3uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_cb3b0b = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_cb3b0b +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_cb3b0b OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_cb3b0b + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_cb3b0b OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_cb3b0b + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_cb3b0b OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl index 846d1196c5..f7148a376c 100644 --- a/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/cb3b0b.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_cb3b0b() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl index 5b2e2f3d4b..c369da8c3d 100644 --- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_d26166() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl index 8ec5059fc3..35e987ae08 100644 --- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d26166() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl index 8ec5059fc3..35e987ae08 100644 --- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d26166() { uint arg_1 = 1u; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl index 22472cea42..121c5326d6 100644 --- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_d26166(texture1d tint_symbol_1) { uint arg_1 = 1u; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm index 922800c121..ee065944a9 100644 --- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -44,41 +44,42 @@ %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %22 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4uint + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d26166 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %25 OpStore %arg_1 %uint_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %uint %arg_1 + %29 = OpLoad %v4uint %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_d26166 +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_d26166 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_d26166 + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_d26166 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_d26166 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_d26166 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl index 9d51a444c7..ce91750fc3 100644 --- a/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d26166.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_d26166() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl index 82ce654908..561690e6ab 100644 --- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_d55e65() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl index 793308855c..3804b294f5 100644 --- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_d55e65() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl index 793308855c..3804b294f5 100644 --- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_d55e65() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl index 87199ca80e..9b95ec7960 100644 --- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_d55e65() { - uvec2 arg_1 = uvec2(0u); + uvec2 arg_1 = uvec2(1u); int arg_2 = 1; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(uvec3(arg_1, uint(arg_2))), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl index 11b7b3b430..4150e81376 100644 --- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_d55e65(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.spvasm index e36f65debe..a2014a6f58 100644 --- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_d55e65 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_d55e65 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_d55e65 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_d55e65 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_d55e65 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_d55e65 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl index 939d999da6..a3cea0035a 100644 --- a/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d55e65.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_d55e65() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl index 5f1aa47de6..c6dc77882b 100644 --- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_d73b5c() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl index e4f893ab01..f0a3ecc941 100644 --- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d73b5c() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl index e4f893ab01..f0a3ecc941 100644 --- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_d73b5c() { int arg_1 = 1; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl index 0fe1471f72..8346f03e3c 100644 --- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_d73b5c(texture1d tint_symbol_1) { int arg_1 = 1; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm index b558399701..5b3270b734 100644 --- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,42 @@ %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %22 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %25 = OpConstantNull %v4int + %30 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d73b5c = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %25 OpStore %arg_1 %int_1 OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %27 = OpLoad %11 %arg_0 + %28 = OpLoad %int %arg_1 + %29 = OpLoad %v4int %arg_2 + OpImageWrite %27 %28 %29 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_d73b5c +%vertex_main_inner = OpFunction %v4float None %30 + %32 = OpLabel + %33 = OpFunctionCall %void %textureStore_d73b5c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %35 = OpLabel + %36 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %36 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_d73b5c + %39 = OpLabel + %40 = OpFunctionCall %void %textureStore_d73b5c OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_d73b5c + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_d73b5c OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl index b5c5458f37..9509d8cf51 100644 --- a/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d73b5c.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_d73b5c() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl index 14bffb57ae..6841e09742 100644 --- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_d82b0a() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl index f01ea8b07c..ea9cc9777e 100644 --- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_d82b0a() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl index f01ea8b07c..ea9cc9777e 100644 --- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_d82b0a() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl index edc5f9a6aa..e81fb99c47 100644 --- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_d82b0a(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - int4 arg_2 = int4(0); + uint3 arg_1 = uint3(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm index 9e0a95c67f..f4e3ceecb0 100644 --- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,44 +42,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %23 = OpConstantNull %v3uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_d82b0a = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_d82b0a +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_d82b0a OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_d82b0a + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_d82b0a OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_d82b0a + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_d82b0a OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl index db0d94f481..8d992f8aad 100644 --- a/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/d82b0a.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_d82b0a() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl index 38c407e3f7..a5df6eb4d6 100644 --- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl +++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_db92a2() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl index 554bd67e3f..992e579020 100644 --- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_db92a2() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl index 554bd67e3f..992e579020 100644 --- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_db92a2() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl index 26e0bf57de..c4cb3bacfd 100644 --- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2D arg_0; void textureStore_db92a2() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl index 71a107aadb..789c06b1f1 100644 --- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_db92a2(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - uint4 arg_2 = uint4(0u); + uint2 arg_1 = uint2(1u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm index 7a570ae5d2..400c092082 100644 --- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_db92a2 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_db92a2 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_db92a2 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_db92a2 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_db92a2 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_db92a2 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl index 87542468aa..e6af452cf0 100644 --- a/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/db92a2.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_db92a2() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl index a026e431cd..79fbb32371 100644 --- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_dd7d81() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl index 303f614926..c632f94ce7 100644 --- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_dd7d81() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl index 303f614926..c632f94ce7 100644 --- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_dd7d81() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl index 2a86984a65..60fac808fa 100644 --- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8_snorm) uniform highp writeonly image3D arg_0; void textureStore_dd7d81() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl index e87f2ed170..30a623959e 100644 --- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_dd7d81(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - float4 arg_2 = float4(0.0f); + int3 arg_1 = int3(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.spvasm index 8e21c4c58a..ff057abb8b 100644 --- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_dd7d81 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_dd7d81 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_dd7d81 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_dd7d81 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_dd7d81 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_dd7d81 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl index 812587cc6a..dfe4f3c678 100644 --- a/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dd7d81.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_dd7d81() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl index 29a96add3a..5796c71dc8 100644 --- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_dde364() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl index 8bda58b0d5..c51681f91c 100644 --- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dde364() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl index 8bda58b0d5..c51681f91c 100644 --- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dde364() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl index 8ac8d03c8a..6073ae5cd7 100644 --- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_dde364(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm index 39505fa9cb..84e5b5f924 100644 --- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 53 +; Bound: 56 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -43,54 +43,57 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %26 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %39 = OpTypeFunction %v4float + %42 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_dde364 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_int Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_int Function %26 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %int_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %36 = OpLoad %int %arg_2 - %37 = OpCompositeConstruct %v3int %34 %35 %36 - %38 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %37 %38 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %39 = OpLoad %int %arg_2 + %40 = OpCompositeConstruct %v3int %37 %38 %39 + %41 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %39 - %41 = OpLabel - %42 = OpFunctionCall %void %textureStore_dde364 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_dde364 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %44 = OpLabel - %45 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %45 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %48 = OpLabel - %49 = OpFunctionCall %void %textureStore_dde364 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %51 = OpLabel %52 = OpFunctionCall %void %textureStore_dde364 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %54 = OpLabel + %55 = OpFunctionCall %void %textureStore_dde364 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl index f9ea808692..7ac5a168f0 100644 --- a/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dde364.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_dde364() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl index 74eb6cefe1..3bd65d23bb 100644 --- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl +++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_de4b94() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl index 298f0d2864..66c4a17ec8 100644 --- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_de4b94() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl index 298f0d2864..66c4a17ec8 100644 --- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_de4b94() { uint arg_1 = 1u; - int4 arg_2 = (0).xxxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl index 92bf21148b..f02fdc7a54 100644 --- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_de4b94(texture1d tint_symbol_1) { uint arg_1 = 1u; - int4 arg_2 = int4(0); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm index 4d60d83cfa..e306fb98d9 100644 --- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_uint = OpTypePointer Function %uint %21 = OpConstantNull %uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_de4b94 = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %21 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 OpStore %arg_1 %uint_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %uint %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_de4b94 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_de4b94 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_de4b94 + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_de4b94 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_de4b94 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_de4b94 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl index 112c6b82ec..98cdbb0e43 100644 --- a/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/de4b94.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_de4b94() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl index 7d52fc2a9d..b03549c7b3 100644 --- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl +++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_df2ca4() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl index 46b5844593..1dfaf0fdc0 100644 --- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_df2ca4() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl index 46b5844593..1dfaf0fdc0 100644 --- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_df2ca4() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl index e7547d3baf..047cb1641a 100644 --- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(r32f) uniform highp writeonly image2DArray arg_0; void textureStore_df2ca4() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - vec4 arg_3 = vec4(0.0f); + vec4 arg_3 = vec4(1.0f); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl index d3eea8d282..633b3cfdee 100644 --- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_df2ca4(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.spvasm index 90f4c06850..aa53658620 100644 --- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,57 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %uint = OpTypeInt 32 0 %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_df2ca4 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %uint_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2int %arg_1 - %32 = OpCompositeExtract %int %31 0 - %33 = OpCompositeExtract %int %31 1 - %35 = OpLoad %uint %arg_2 - %34 = OpBitcast %int %35 - %36 = OpCompositeConstruct %v3int %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2int %arg_1 + %36 = OpCompositeExtract %int %35 0 + %37 = OpCompositeExtract %int %35 1 + %39 = OpLoad %uint %arg_2 + %38 = OpBitcast %int %39 + %40 = OpCompositeConstruct %v3int %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_df2ca4 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_df2ca4 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_df2ca4 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_df2ca4 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_df2ca4 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl index 60250cc1da..4775cc0472 100644 --- a/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/df2ca4.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_df2ca4() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl index f8595d43ed..8371fa3c28 100644 --- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_dfa9a1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl index 0342085c9e..fef042fba2 100644 --- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dfa9a1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl index 0342085c9e..fef042fba2 100644 --- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dfa9a1() { - uint2 arg_1 = (0u).xx; + uint2 arg_1 = (1u).xx; int arg_2 = 1; - float4 arg_3 = (0.0f).xxxx; + float4 arg_3 = (1.0f).xxxx; arg_0[uint3(arg_1, uint(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl index 48961caf7e..3ed3139f8f 100644 --- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_dfa9a1(texture2d_array tint_symbol_1) { - uint2 arg_1 = uint2(0u); + uint2 arg_1 = uint2(1u); int arg_2 = 1; - float4 arg_3 = float4(0.0f); + float4 arg_3 = float4(1.0f); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.spvasm index 1bf8a16310..16fa8effe3 100644 --- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 55 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,54 +42,57 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %int = OpTypeInt 32 1 %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int - %25 = OpConstantNull %int + %27 = OpConstantNull %int + %float_1 = OpConstant %float 1 + %29 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 %_ptr_Function_v4float = OpTypePointer Function %v4float %v3uint = OpTypeVector %uint 3 - %38 = OpTypeFunction %v4float - %float_1 = OpConstant %float 1 + %42 = OpTypeFunction %v4float %textureStore_dfa9a1 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %27 %arg_3 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %5 - %29 = OpLoad %11 %arg_0 - %31 = OpLoad %v2uint %arg_1 - %32 = OpCompositeExtract %uint %31 0 - %33 = OpCompositeExtract %uint %31 1 - %35 = OpLoad %int %arg_2 - %34 = OpBitcast %uint %35 - %36 = OpCompositeConstruct %v3uint %32 %33 %34 - %37 = OpLoad %v4float %arg_3 - OpImageWrite %29 %36 %37 + OpStore %arg_3 %29 + %33 = OpLoad %11 %arg_0 + %35 = OpLoad %v2uint %arg_1 + %36 = OpCompositeExtract %uint %35 0 + %37 = OpCompositeExtract %uint %35 1 + %39 = OpLoad %int %arg_2 + %38 = OpBitcast %uint %39 + %40 = OpCompositeConstruct %v3uint %36 %37 %38 + %41 = OpLoad %v4float %arg_3 + OpImageWrite %33 %40 %41 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_dfa9a1 +%vertex_main_inner = OpFunction %v4float None %42 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_dfa9a1 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %47 = OpLabel + %48 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %48 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_dfa9a1 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %50 = OpLabel %51 = OpFunctionCall %void %textureStore_dfa9a1 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %53 = OpLabel + %54 = OpFunctionCall %void %textureStore_dfa9a1 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl index f811438614..b09f84ac09 100644 --- a/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dfa9a1.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_dfa9a1() { - var arg_1 = vec2(); + var arg_1 = vec2(1u); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl index 760a063af5..175a7f54a6 100644 --- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_dffb13() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl index 532d05c1a7..ff6b8f4034 100644 --- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dffb13() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl index 532d05c1a7..ff6b8f4034 100644 --- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_dffb13() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl index 7218365f74..6d26bd7086 100644 --- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_dffb13(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm index 35fc43af64..39fdc1608f 100644 --- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -43,55 +43,58 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_dffb13 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_dffb13 +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_dffb13 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_dffb13 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_dffb13 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_dffb13 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl index e3ba4166b2..be48ae6a12 100644 --- a/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/dffb13.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_dffb13() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl index c05dac56bf..c8fbc8258d 100644 --- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl +++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: u32, value: vec4) fn textureStore_e7c6d8() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl index af74e51703..c41266dd60 100644 --- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e7c6d8() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl index af74e51703..c41266dd60 100644 --- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e7c6d8() { uint arg_1 = 1u; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl index 9b202d0cc8..5d63f1bcb9 100644 --- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_e7c6d8(texture1d tint_symbol_1) { uint arg_1 = 1u; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm index e7268c900e..9e5c49a427 100644 --- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint %20 = OpConstantNull %uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_e7c6d8 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_uint Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %uint_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %uint %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_e7c6d8 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_e7c6d8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_e7c6d8 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_e7c6d8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_e7c6d8 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_e7c6d8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl index 7815feb4f4..3998c63b60 100644 --- a/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/e7c6d8.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_e7c6d8() { var arg_1 = 1u; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl index bc4a83016f..34b40f5ad3 100644 --- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl +++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_e885e8() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl index 3a6acf9920..0cb3ecca36 100644 --- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e885e8() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl index 3a6acf9920..0cb3ecca36 100644 --- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_e885e8() { int arg_1 = 1; - float4 arg_2 = (0.0f).xxxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl index 67de77cde1..cdb58ca1ec 100644 --- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_e885e8(texture1d tint_symbol_1) { int arg_1 = 1; - float4 arg_2 = float4(0.0f); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.spvasm index de6672d838..948a8a3279 100644 --- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 42 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -43,40 +43,41 @@ %int_1 = OpConstant %int 1 %_ptr_Function_int = OpTypePointer Function %int %20 = OpConstantNull %int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 + %22 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %29 = OpTypeFunction %v4float %textureStore_e885e8 = OpFunction %void None %12 %15 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %20 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 OpStore %arg_1 %int_1 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_2 %22 + %26 = OpLoad %11 %arg_0 + %27 = OpLoad %int %arg_1 + %28 = OpLoad %v4float %arg_2 + OpImageWrite %26 %27 %28 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_e885e8 +%vertex_main_inner = OpFunction %v4float None %29 + %31 = OpLabel + %32 = OpFunctionCall %void %textureStore_e885e8 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %34 = OpLabel + %35 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %35 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_e885e8 + %37 = OpLabel + %38 = OpFunctionCall %void %textureStore_e885e8 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %12 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_e885e8 + %40 = OpLabel + %41 = OpFunctionCall %void %textureStore_e885e8 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl index 32e9ffd05a..3fcda8b0c8 100644 --- a/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/e885e8.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_e885e8() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl index dfffdaa572..cf4ab0c4ea 100644 --- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl +++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_2d, coords: vec2, value: vec4) fn textureStore_e8cbf7() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl index 645dff7ca0..165e0bcac3 100644 --- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_e8cbf7() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl index 645dff7ca0..165e0bcac3 100644 --- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture2D arg_0 : register(u0, space1); void textureStore_e8cbf7() { - uint2 arg_1 = (0u).xx; - uint4 arg_2 = (0u).xxxx; + uint2 arg_1 = (1u).xx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl index 5852ebd465..4049bc91b5 100644 --- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32ui) uniform highp writeonly uimage2D arg_0; void textureStore_e8cbf7() { - uvec2 arg_1 = uvec2(0u); - uvec4 arg_2 = uvec4(0u); + uvec2 arg_1 = uvec2(1u); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, ivec2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl index 92344cd8d7..4412956af7 100644 --- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_e8cbf7(texture2d tint_symbol_1) { - uint2 arg_1 = uint2(0u); - uint4 arg_2 = uint4(0u); + uint2 arg_1 = uint2(1u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint2(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm index 83db77658f..4ba7a7beed 100644 --- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2uint = OpTypeVector %uint 2 - %18 = OpConstantNull %v2uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v2uint %uint_1 %uint_1 %_ptr_Function_v2uint = OpTypePointer Function %v2uint + %22 = OpConstantNull %v2uint %v4uint = OpTypeVector %uint 4 - %22 = OpConstantNull %v4uint + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_e8cbf7 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2uint Function %18 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v2uint %arg_1 - %28 = OpLoad %v4uint %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v2uint Function %22 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v2uint %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_e8cbf7 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_e8cbf7 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_e8cbf7 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_e8cbf7 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_e8cbf7 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl index f43ca9b0e1..04022000a0 100644 --- a/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/e8cbf7.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d; fn textureStore_e8cbf7() { - var arg_1 = vec2(); - var arg_2 = vec4(); + var arg_1 = vec2(1u); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl index 098cfadfb3..36372e1fae 100644 --- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_eb702f() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl index 55d4e79233..ddfc3826ed 100644 --- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb702f() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl index 55d4e79233..ddfc3826ed 100644 --- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb702f() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl index 5dfa23db7b..89e2a01c5a 100644 --- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32f) uniform highp writeonly image3D arg_0; void textureStore_eb702f() { - ivec3 arg_1 = ivec3(0); - vec4 arg_2 = vec4(0.0f); + ivec3 arg_1 = ivec3(1); + vec4 arg_2 = vec4(1.0f); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl index 9926e894f2..550c53ed4e 100644 --- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_eb702f(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - float4 arg_2 = float4(0.0f); + int3 arg_1 = int3(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.spvasm index 8d9bddbc03..f64b950b8b 100644 --- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,42 +40,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_eb702f = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_eb702f +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_eb702f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_eb702f - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_eb702f OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_eb702f + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl index bc8a259f79..9b56f0d1eb 100644 --- a/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/eb702f.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_eb702f() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl index 0ec2c27b9e..bf2ec488f8 100644 --- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl +++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_eb78b9() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl index c798708dd7..626d4a8b3f 100644 --- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb78b9() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl index c798708dd7..626d4a8b3f 100644 --- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_eb78b9() { - int3 arg_1 = (0).xxx; - int4 arg_2 = (0).xxxx; + int3 arg_1 = (1).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl index 7a6aa1221e..ba4886ca4d 100644 --- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_eb78b9() { - ivec3 arg_1 = ivec3(0); - ivec4 arg_2 = ivec4(0); + ivec3 arg_1 = ivec3(1); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl index e5b872f51c..135de26a20 100644 --- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_eb78b9(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - int4 arg_2 = int4(0); + int3 arg_1 = int3(1); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.spvasm index ca55182024..b48dd46823 100644 --- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 43 +; Bound: 46 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -40,44 +40,47 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %22 = OpConstantNull %v3int %v4int = OpTypeVector %int 4 - %22 = OpConstantNull %v4int + %24 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %29 = OpTypeFunction %v4float + %27 = OpConstantNull %v4int + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_eb78b9 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 - %arg_2 = OpVariable %_ptr_Function_v4int Function %22 - OpStore %arg_1 %18 - OpStore %arg_2 %22 - %26 = OpLoad %11 %arg_0 - %27 = OpLoad %v3int %arg_1 - %28 = OpLoad %v4int %arg_2 - OpImageWrite %26 %27 %28 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 + %arg_2 = OpVariable %_ptr_Function_v4int Function %27 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %v3int %arg_1 + %31 = OpLoad %v4int %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %29 - %31 = OpLabel - %32 = OpFunctionCall %void %textureStore_eb78b9 +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_eb78b9 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %34 = OpLabel - %35 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %35 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %38 = OpLabel - %39 = OpFunctionCall %void %textureStore_eb78b9 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %41 = OpLabel %42 = OpFunctionCall %void %textureStore_eb78b9 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_eb78b9 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl index 2d7e63513b..cbee439ad6 100644 --- a/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/eb78b9.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_eb78b9() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl index 19d501f745..6b99bfabb7 100644 --- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl +++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ee6acc() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl index a6ce8c7b0f..bfaac7970e 100644 --- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ee6acc() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl index a6ce8c7b0f..bfaac7970e 100644 --- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ee6acc() { - int3 arg_1 = (0).xxx; - float4 arg_2 = (0.0f).xxxx; + int3 arg_1 = (1).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl index 9b5c9220e9..ad212b6f60 100644 --- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_ee6acc(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - float4 arg_2 = float4(0.0f); + int3 arg_1 = int3(1); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.spvasm index bc3df6dbd5..a004106ebb 100644 --- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -41,42 +41,45 @@ %12 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %18 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3int %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_ee6acc = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %18 + %arg_1 = OpVariable %_ptr_Function_v3int Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3int %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3int %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_ee6acc +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_ee6acc OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_ee6acc - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_ee6acc OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_ee6acc + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl index 8ba6d40420..c55bbcddb5 100644 --- a/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/ee6acc.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ee6acc() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl index fa28513936..9154768d66 100644 --- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_ef9f2f() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl index ded9f9515a..be459f04c8 100644 --- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ef9f2f() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl index ded9f9515a..be459f04c8 100644 --- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_ef9f2f() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl index 040973d2dc..03179e42ce 100644 --- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32ui) uniform highp writeonly uimage3D arg_0; void textureStore_ef9f2f() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl index 9c6a6bdac6..f7972bd28d 100644 --- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_ef9f2f(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - uint4 arg_2 = uint4(0u); + int3 arg_1 = int3(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm index 4148955254..f841295ea1 100644 --- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %23 = OpConstantNull %v3int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_ef9f2f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_ef9f2f +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_ef9f2f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_ef9f2f + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_ef9f2f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_ef9f2f + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_ef9f2f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl index 1045a895fa..dd6845fd12 100644 --- a/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/ef9f2f.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_ef9f2f() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl index 1014342a01..f2caa3c814 100644 --- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl +++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_f1e6d3() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl index 56d522abb7..0563325c61 100644 --- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f1e6d3() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl index 56d522abb7..0563325c61 100644 --- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f1e6d3() { - uint3 arg_1 = (0u).xxx; - int4 arg_2 = (0).xxxx; + uint3 arg_1 = (1u).xxx; + int4 arg_2 = (1).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl index a4e196b7da..1276474ea8 100644 --- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } @@ -42,8 +42,8 @@ void main() { layout(r32i) uniform highp writeonly iimage3D arg_0; void textureStore_f1e6d3() { - uvec3 arg_1 = uvec3(0u); - ivec4 arg_2 = ivec4(0); + uvec3 arg_1 = uvec3(1u); + ivec4 arg_2 = ivec4(1); imageStore(arg_0, ivec3(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl index c32f6a9f3f..38b3da4878 100644 --- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_f1e6d3(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - int4 arg_2 = int4(0); + uint3 arg_1 = uint3(1u); + int4 arg_2 = int4(1); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm index baf55195f5..8e17d8104f 100644 --- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %19 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %20 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint + %23 = OpConstantNull %v3uint %v4int = OpTypeVector %int 4 - %23 = OpConstantNull %v4int + %int_1 = OpConstant %int 1 + %26 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4int + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_f1e6d3 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %19 - %arg_2 = OpVariable %_ptr_Function_v4int Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3uint %arg_1 - %29 = OpLoad %v4int %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4int Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3uint %arg_1 + %33 = OpLoad %v4int %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_f1e6d3 +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_f1e6d3 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_f1e6d3 + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_f1e6d3 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_f1e6d3 + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_f1e6d3 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl index 3fe60f3a07..2f64952b64 100644 --- a/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/f1e6d3.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_f1e6d3() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1i); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl index b58c3ffab6..8068cf5b8b 100644 --- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl +++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_f8dead() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl index 94111fb252..5ada5ff2ca 100644 --- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f8dead() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl index 94111fb252..5ada5ff2ca 100644 --- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_f8dead() { - int3 arg_1 = (0).xxx; - uint4 arg_2 = (0u).xxxx; + int3 arg_1 = (1).xxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl index 3583671c2f..c0607a9d80 100644 --- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.glsl @@ -2,8 +2,8 @@ layout(rgba8ui) uniform highp writeonly uimage3D arg_0; void textureStore_f8dead() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -25,8 +25,8 @@ precision mediump float; layout(rgba8ui) uniform highp writeonly uimage3D arg_0; void textureStore_f8dead() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } @@ -42,8 +42,8 @@ void main() { layout(rgba8ui) uniform highp writeonly uimage3D arg_0; void textureStore_f8dead() { - ivec3 arg_1 = ivec3(0); - uvec4 arg_2 = uvec4(0u); + ivec3 arg_1 = ivec3(1); + uvec4 arg_2 = uvec4(1u); imageStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl index 4e6da981dc..735272b228 100644 --- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_f8dead(texture3d tint_symbol_1) { - int3 arg_1 = int3(0); - uint4 arg_2 = uint4(0u); + int3 arg_1 = int3(1); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm index 2a9e3e8e2e..a125397f4b 100644 --- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 48 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,44 +41,48 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v3int = OpTypeVector %int 3 - %19 = OpConstantNull %v3int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v3int %int_1 %int_1 %int_1 %_ptr_Function_v3int = OpTypePointer Function %v3int + %23 = OpConstantNull %v3int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %26 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %29 = OpConstantNull %v4uint + %34 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_f8dead = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3int Function %19 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 - OpStore %arg_1 %19 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %v3int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + %arg_1 = OpVariable %_ptr_Function_v3int Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %29 + OpStore %arg_1 %20 + OpStore %arg_2 %26 + %31 = OpLoad %11 %arg_0 + %32 = OpLoad %v3int %arg_1 + %33 = OpLoad %v4uint %arg_2 + OpImageWrite %31 %32 %33 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_f8dead +%vertex_main_inner = OpFunction %v4float None %34 + %36 = OpLabel + %37 = OpFunctionCall %void %textureStore_f8dead OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %39 = OpLabel + %40 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %40 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_f8dead + %43 = OpLabel + %44 = OpFunctionCall %void %textureStore_f8dead OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_f8dead + %46 = OpLabel + %47 = OpFunctionCall %void %textureStore_f8dead OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl index 52a1d3e12c..b510b95d55 100644 --- a/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/f8dead.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_f8dead() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1i); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl index d1d281550f..101ef88294 100644 --- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl +++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_f9be83() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl index 129bfb8de6..4b36d74763 100644 --- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_f9be83() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl index 129bfb8de6..4b36d74763 100644 --- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_f9be83() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl index 0217d28a2f..07cbf5cdaa 100644 --- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_f9be83(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm index c7ee036056..4f8bbfb514 100644 --- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -42,54 +42,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %30 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_f9be83 = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_v4int Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_v4int Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2int %arg_1 - %33 = OpCompositeExtract %int %32 0 - %34 = OpCompositeExtract %int %32 1 - %35 = OpLoad %int %arg_2 - %36 = OpCompositeConstruct %v3int %33 %34 %35 - %37 = OpLoad %v4int %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2int %arg_1 + %35 = OpCompositeExtract %int %34 0 + %36 = OpCompositeExtract %int %34 1 + %37 = OpLoad %int %arg_2 + %38 = OpCompositeConstruct %v3int %35 %36 %37 + %39 = OpLoad %v4int %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_f9be83 +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_f9be83 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_f9be83 + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_f9be83 OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_f9be83 + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_f9be83 OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl index 3e9226ef39..d7ad8ba128 100644 --- a/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/f9be83.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_f9be83() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl index 7b6b6af51c..2b020b6eb8 100644 --- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl @@ -25,7 +25,7 @@ // fn textureStore(texture: texture_storage_1d, coords: i32, value: vec4) fn textureStore_fb9a8f() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl index 7e5b23d042..2809d9dfa9 100644 --- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.dxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_fb9a8f() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl index 7e5b23d042..2809d9dfa9 100644 --- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.fxc.hlsl @@ -2,7 +2,7 @@ RWTexture1D arg_0 : register(u0, space1); void textureStore_fb9a8f() { int arg_1 = 1; - uint4 arg_2 = (0u).xxxx; + uint4 arg_2 = (1u).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl index a808ba3fd7..9e3b7d1ca0 100644 --- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.msl @@ -3,7 +3,7 @@ using namespace metal; void textureStore_fb9a8f(texture1d tint_symbol_1) { int arg_1 = 1; - uint4 arg_2 = uint4(0u); + uint4 arg_2 = uint4(1u); tint_symbol_1.write(arg_2, uint(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm index 708e2397fa..9b76cd8341 100644 --- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 44 +; Bound: 46 ; Schema: 0 OpCapability Shader OpCapability Image1D @@ -45,41 +45,43 @@ %_ptr_Function_int = OpTypePointer Function %int %21 = OpConstantNull %int %v4uint = OpTypeVector %uint 4 - %23 = OpConstantNull %v4uint + %uint_1 = OpConstant %uint 1 + %24 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint - %30 = OpTypeFunction %v4float + %27 = OpConstantNull %v4uint + %32 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_fb9a8f = OpFunction %void None %13 %16 = OpLabel %arg_1 = OpVariable %_ptr_Function_int Function %21 - %arg_2 = OpVariable %_ptr_Function_v4uint Function %23 + %arg_2 = OpVariable %_ptr_Function_v4uint Function %27 OpStore %arg_1 %int_1 - OpStore %arg_2 %23 - %27 = OpLoad %11 %arg_0 - %28 = OpLoad %int %arg_1 - %29 = OpLoad %v4uint %arg_2 - OpImageWrite %27 %28 %29 + OpStore %arg_2 %24 + %29 = OpLoad %11 %arg_0 + %30 = OpLoad %int %arg_1 + %31 = OpLoad %v4uint %arg_2 + OpImageWrite %29 %30 %31 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %30 - %32 = OpLabel - %33 = OpFunctionCall %void %textureStore_fb9a8f +%vertex_main_inner = OpFunction %v4float None %32 + %34 = OpLabel + %35 = OpFunctionCall %void %textureStore_fb9a8f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %35 = OpLabel - %36 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %36 + %37 = OpLabel + %38 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %38 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %39 = OpLabel - %40 = OpFunctionCall %void %textureStore_fb9a8f + %41 = OpLabel + %42 = OpFunctionCall %void %textureStore_fb9a8f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_fb9a8f + %44 = OpLabel + %45 = OpFunctionCall %void %textureStore_fb9a8f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl index aaeb8f9513..35389e1251 100644 --- a/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fb9a8f.wgsl.expected.wgsl @@ -2,7 +2,7 @@ fn textureStore_fb9a8f() { var arg_1 = 1i; - var arg_2 = vec4(); + var arg_2 = vec4(1u); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl index b3a551b636..6ef2bed6f0 100644 --- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: i32, value: vec4) fn textureStore_fbf53f() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl index 46a154da23..b90466e77b 100644 --- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fbf53f() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl index 46a154da23..b90466e77b 100644 --- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fbf53f() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; int arg_2 = 1; - int4 arg_3 = (0).xxxx; + int4 arg_3 = (1).xxxx; arg_0[int3(arg_1, arg_2)] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl index c36d4950da..7e5516fad8 100644 --- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_fbf53f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_fbf53f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba8i) uniform highp writeonly iimage2DArray arg_0; void textureStore_fbf53f() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); int arg_2 = 1; - ivec4 arg_3 = ivec4(0); + ivec4 arg_3 = ivec4(1); imageStore(arg_0, ivec3(arg_1, arg_2), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl index 7d00e81d24..9a5b5d05cf 100644 --- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_fbf53f(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); int arg_2 = 1; - int4 arg_3 = int4(0); + int4 arg_3 = int4(1); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm index 037b3ee220..a1a0556ed1 100644 --- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 52 +; Bound: 54 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -41,54 +41,56 @@ %void = OpTypeVoid %13 = OpTypeFunction %void %v2int = OpTypeVector %int 2 - %18 = OpConstantNull %v2int -%_ptr_Function_v2int = OpTypePointer Function %v2int %int_1 = OpConstant %int 1 + %19 = OpConstantComposite %v2int %int_1 %int_1 +%_ptr_Function_v2int = OpTypePointer Function %v2int + %22 = OpConstantNull %v2int %_ptr_Function_int = OpTypePointer Function %int - %24 = OpConstantNull %int + %25 = OpConstantNull %int %v4int = OpTypeVector %int 4 - %26 = OpConstantNull %v4int + %27 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1 %_ptr_Function_v4int = OpTypePointer Function %v4int + %30 = OpConstantNull %v4int %v3int = OpTypeVector %int 3 - %38 = OpTypeFunction %v4float + %40 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_fbf53f = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %18 - %arg_2 = OpVariable %_ptr_Function_int Function %24 - %arg_3 = OpVariable %_ptr_Function_v4int Function %26 - OpStore %arg_1 %18 + %arg_1 = OpVariable %_ptr_Function_v2int Function %22 + %arg_2 = OpVariable %_ptr_Function_int Function %25 + %arg_3 = OpVariable %_ptr_Function_v4int Function %30 + OpStore %arg_1 %19 OpStore %arg_2 %int_1 - OpStore %arg_3 %26 - %30 = OpLoad %11 %arg_0 - %32 = OpLoad %v2int %arg_1 - %33 = OpCompositeExtract %int %32 0 - %34 = OpCompositeExtract %int %32 1 - %35 = OpLoad %int %arg_2 - %36 = OpCompositeConstruct %v3int %33 %34 %35 - %37 = OpLoad %v4int %arg_3 - OpImageWrite %30 %36 %37 + OpStore %arg_3 %27 + %32 = OpLoad %11 %arg_0 + %34 = OpLoad %v2int %arg_1 + %35 = OpCompositeExtract %int %34 0 + %36 = OpCompositeExtract %int %34 1 + %37 = OpLoad %int %arg_2 + %38 = OpCompositeConstruct %v3int %35 %36 %37 + %39 = OpLoad %v4int %arg_3 + OpImageWrite %32 %38 %39 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %38 - %40 = OpLabel - %41 = OpFunctionCall %void %textureStore_fbf53f +%vertex_main_inner = OpFunction %v4float None %40 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_fbf53f OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %43 = OpLabel - %44 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %44 + %45 = OpLabel + %46 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %46 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %47 = OpLabel - %48 = OpFunctionCall %void %textureStore_fbf53f + %49 = OpLabel + %50 = OpFunctionCall %void %textureStore_fbf53f OpReturn OpFunctionEnd %compute_main = OpFunction %void None %13 - %50 = OpLabel - %51 = OpFunctionCall %void %textureStore_fbf53f + %52 = OpLabel + %53 = OpFunctionCall %void %textureStore_fbf53f OpReturn OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl index e9c201cf14..3b54b98b9b 100644 --- a/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fbf53f.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_fbf53f() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1i; - var arg_3 = vec4(); + var arg_3 = vec4(1i); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl index 808c43b8c3..775b39ae4a 100644 --- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl @@ -24,8 +24,8 @@ // fn textureStore(texture: texture_storage_3d, coords: vec3, value: vec4) fn textureStore_fcbe66() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl index 2f4a6daf73..ed3218d5df 100644 --- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.dxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_fcbe66() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl index 2f4a6daf73..ed3218d5df 100644 --- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.fxc.hlsl @@ -1,8 +1,8 @@ RWTexture3D arg_0 : register(u0, space1); void textureStore_fcbe66() { - uint3 arg_1 = (0u).xxx; - float4 arg_2 = (0.0f).xxxx; + uint3 arg_1 = (1u).xxx; + float4 arg_2 = (1.0f).xxxx; arg_0[arg_1] = arg_2; } diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl index e370bf5142..036ba38f95 100644 --- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.msl @@ -2,8 +2,8 @@ using namespace metal; void textureStore_fcbe66(texture3d tint_symbol_1) { - uint3 arg_1 = uint3(0u); - float4 arg_2 = float4(0.0f); + uint3 arg_1 = uint3(1u); + float4 arg_2 = float4(1.0f); tint_symbol_1.write(arg_2, uint3(arg_1)); } diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm index e40ac5d0f6..250f4de1fc 100644 --- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 41 +; Bound: 44 ; Schema: 0 OpCapability Shader OpCapability StorageImageExtendedFormats @@ -41,42 +41,45 @@ %12 = OpTypeFunction %void %uint = OpTypeInt 32 0 %v3uint = OpTypeVector %uint 3 - %18 = OpConstantNull %v3uint + %uint_1 = OpConstant %uint 1 + %19 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1 %_ptr_Function_v3uint = OpTypePointer Function %v3uint -%_ptr_Function_v4float = OpTypePointer Function %v4float - %27 = OpTypeFunction %v4float + %22 = OpConstantNull %v3uint %float_1 = OpConstant %float 1 + %24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1 +%_ptr_Function_v4float = OpTypePointer Function %v4float + %31 = OpTypeFunction %v4float %textureStore_fcbe66 = OpFunction %void None %12 %15 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v3uint Function %18 + %arg_1 = OpVariable %_ptr_Function_v3uint Function %22 %arg_2 = OpVariable %_ptr_Function_v4float Function %5 - OpStore %arg_1 %18 - OpStore %arg_2 %5 - %24 = OpLoad %11 %arg_0 - %25 = OpLoad %v3uint %arg_1 - %26 = OpLoad %v4float %arg_2 - OpImageWrite %24 %25 %26 + OpStore %arg_1 %19 + OpStore %arg_2 %24 + %28 = OpLoad %11 %arg_0 + %29 = OpLoad %v3uint %arg_1 + %30 = OpLoad %v4float %arg_2 + OpImageWrite %28 %29 %30 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %27 - %29 = OpLabel - %30 = OpFunctionCall %void %textureStore_fcbe66 +%vertex_main_inner = OpFunction %v4float None %31 + %33 = OpLabel + %34 = OpFunctionCall %void %textureStore_fcbe66 OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %12 - %32 = OpLabel - %33 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %33 + %36 = OpLabel + %37 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %37 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %12 - %36 = OpLabel - %37 = OpFunctionCall %void %textureStore_fcbe66 - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %12 %39 = OpLabel %40 = OpFunctionCall %void %textureStore_fcbe66 OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %12 + %42 = OpLabel + %43 = OpFunctionCall %void %textureStore_fcbe66 + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl index 8401058832..580017e3e8 100644 --- a/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fcbe66.wgsl.expected.wgsl @@ -1,8 +1,8 @@ @group(1) @binding(0) var arg_0 : texture_storage_3d; fn textureStore_fcbe66() { - var arg_1 = vec3(); - var arg_2 = vec4(); + var arg_1 = vec3(1u); + var arg_2 = vec4(1.0f); textureStore(arg_0, arg_1, arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl index 9126e1085e..8c61c4e968 100644 --- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl @@ -24,9 +24,9 @@ // fn textureStore(texture: texture_storage_2d_array, coords: vec2, array_index: u32, value: vec4) fn textureStore_fd350c() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl index d932e87561..fb441fdf70 100644 --- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.dxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fd350c() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl index d932e87561..fb441fdf70 100644 --- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl +++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.fxc.hlsl @@ -1,9 +1,9 @@ RWTexture2DArray arg_0 : register(u0, space1); void textureStore_fd350c() { - int2 arg_1 = (0).xx; + int2 arg_1 = (1).xx; uint arg_2 = 1u; - uint4 arg_3 = (0u).xxxx; + uint4 arg_3 = (1u).xxxx; arg_0[int3(arg_1, int(arg_2))] = arg_3; } diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl index 6b1fe61d5d..aa4132aa3a 100644 --- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl +++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.glsl @@ -2,9 +2,9 @@ layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_fd350c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -26,9 +26,9 @@ precision mediump float; layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_fd350c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } @@ -44,9 +44,9 @@ void main() { layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0; void textureStore_fd350c() { - ivec2 arg_1 = ivec2(0); + ivec2 arg_1 = ivec2(1); uint arg_2 = 1u; - uvec4 arg_3 = uvec4(0u); + uvec4 arg_3 = uvec4(1u); imageStore(arg_0, ivec3(arg_1, int(arg_2)), arg_3); } diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl index a35e4c81fa..242dda3e46 100644 --- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl +++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.msl @@ -2,9 +2,9 @@ using namespace metal; void textureStore_fd350c(texture2d_array tint_symbol_1) { - int2 arg_1 = int2(0); + int2 arg_1 = int2(1); uint arg_2 = 1u; - uint4 arg_3 = uint4(0u); + uint4 arg_3 = uint4(1u); tint_symbol_1.write(arg_3, uint2(arg_1), arg_2); } diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm index 1dcd751ed3..054cd16ca6 100644 --- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm +++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 54 +; Bound: 57 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -42,55 +42,58 @@ %13 = OpTypeFunction %void %int = OpTypeInt 32 1 %v2int = OpTypeVector %int 2 - %19 = OpConstantNull %v2int + %int_1 = OpConstant %int 1 + %20 = OpConstantComposite %v2int %int_1 %int_1 %_ptr_Function_v2int = OpTypePointer Function %v2int + %23 = OpConstantNull %v2int %uint_1 = OpConstant %uint 1 %_ptr_Function_uint = OpTypePointer Function %uint - %25 = OpConstantNull %uint + %27 = OpConstantNull %uint %v4uint = OpTypeVector %uint 4 - %27 = OpConstantNull %v4uint + %29 = OpConstantComposite %v4uint %uint_1 %uint_1 %uint_1 %uint_1 %_ptr_Function_v4uint = OpTypePointer Function %v4uint + %32 = OpConstantNull %v4uint %v3int = OpTypeVector %int 3 - %40 = OpTypeFunction %v4float + %43 = OpTypeFunction %v4float %float_1 = OpConstant %float 1 %textureStore_fd350c = OpFunction %void None %13 %16 = OpLabel - %arg_1 = OpVariable %_ptr_Function_v2int Function %19 - %arg_2 = OpVariable %_ptr_Function_uint Function %25 - %arg_3 = OpVariable %_ptr_Function_v4uint Function %27 - OpStore %arg_1 %19 + %arg_1 = OpVariable %_ptr_Function_v2int Function %23 + %arg_2 = OpVariable %_ptr_Function_uint Function %27 + %arg_3 = OpVariable %_ptr_Function_v4uint Function %32 + OpStore %arg_1 %20 OpStore %arg_2 %uint_1 - OpStore %arg_3 %27 - %31 = OpLoad %11 %arg_0 - %33 = OpLoad %v2int %arg_1 - %34 = OpCompositeExtract %int %33 0 - %35 = OpCompositeExtract %int %33 1 - %37 = OpLoad %uint %arg_2 - %36 = OpBitcast %int %37 - %38 = OpCompositeConstruct %v3int %34 %35 %36 - %39 = OpLoad %v4uint %arg_3 - OpImageWrite %31 %38 %39 + OpStore %arg_3 %29 + %34 = OpLoad %11 %arg_0 + %36 = OpLoad %v2int %arg_1 + %37 = OpCompositeExtract %int %36 0 + %38 = OpCompositeExtract %int %36 1 + %40 = OpLoad %uint %arg_2 + %39 = OpBitcast %int %40 + %41 = OpCompositeConstruct %v3int %37 %38 %39 + %42 = OpLoad %v4uint %arg_3 + OpImageWrite %34 %41 %42 OpReturn OpFunctionEnd -%vertex_main_inner = OpFunction %v4float None %40 - %42 = OpLabel - %43 = OpFunctionCall %void %textureStore_fd350c +%vertex_main_inner = OpFunction %v4float None %43 + %45 = OpLabel + %46 = OpFunctionCall %void %textureStore_fd350c OpReturnValue %5 OpFunctionEnd %vertex_main = OpFunction %void None %13 - %45 = OpLabel - %46 = OpFunctionCall %v4float %vertex_main_inner - OpStore %value %46 + %48 = OpLabel + %49 = OpFunctionCall %v4float %vertex_main_inner + OpStore %value %49 OpStore %vertex_point_size %float_1 OpReturn OpFunctionEnd %fragment_main = OpFunction %void None %13 - %49 = OpLabel - %50 = OpFunctionCall %void %textureStore_fd350c - OpReturn - OpFunctionEnd -%compute_main = OpFunction %void None %13 %52 = OpLabel %53 = OpFunctionCall %void %textureStore_fd350c OpReturn OpFunctionEnd +%compute_main = OpFunction %void None %13 + %55 = OpLabel + %56 = OpFunctionCall %void %textureStore_fd350c + OpReturn + OpFunctionEnd diff --git a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl index 6e3a2937b3..1a03bccaa5 100644 --- a/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl +++ b/test/tint/builtins/gen/var/textureStore/fd350c.wgsl.expected.wgsl @@ -1,9 +1,9 @@ @group(1) @binding(0) var arg_0 : texture_storage_2d_array; fn textureStore_fd350c() { - var arg_1 = vec2(); + var arg_1 = vec2(1i); var arg_2 = 1u; - var arg_3 = vec4(); + var arg_3 = vec4(1u); textureStore(arg_0, arg_1, arg_2, arg_3); }