mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
transform: Don't unroll arrays in DecomposeMemoryAccess
Arrays can be extremely large, and having the load and store functions unroll the elements can make the complier explode. Fixed: chromium:1229233 Change-Id: Ieb5654254e16f5ce724a205d21d954ef9a0cd053 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58382 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org> Reviewed-by: David Neto <dneto@google.com> Auto-Submit: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
c33503069c
commit
883fb63e01
@@ -11,7 +11,7 @@ float2x3 tint_symbol_6(ByteAddressBuffer buffer, uint offset) {
|
||||
return float2x3(asfloat(buffer.Load3((offset + 0u))), asfloat(buffer.Load3((offset + 16u))));
|
||||
}
|
||||
|
||||
float3x2 tint_symbol_8(ByteAddressBuffer buffer, uint offset) {
|
||||
float3x2 tint_symbol_7(ByteAddressBuffer buffer, uint offset) {
|
||||
return float3x2(asfloat(buffer.Load2((offset + 0u))), asfloat(buffer.Load2((offset + 8u))), asfloat(buffer.Load2((offset + 16u))));
|
||||
}
|
||||
|
||||
@@ -22,8 +22,13 @@ Inner tint_symbol_9(ByteAddressBuffer buffer, uint offset) {
|
||||
|
||||
typedef tint_padded_array_element tint_symbol_10_ret[4];
|
||||
tint_symbol_10_ret tint_symbol_10(ByteAddressBuffer buffer, uint offset) {
|
||||
const tint_padded_array_element tint_symbol_12[4] = {{tint_symbol_9(buffer, (offset + 0u))}, {tint_symbol_9(buffer, (offset + 16u))}, {tint_symbol_9(buffer, (offset + 32u))}, {tint_symbol_9(buffer, (offset + 48u))}};
|
||||
return tint_symbol_12;
|
||||
tint_padded_array_element arr[4] = (tint_padded_array_element[4])0;
|
||||
{
|
||||
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
arr[i_1].el = tint_symbol_9(buffer, (offset + (i_1 * 16u)));
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
@@ -35,7 +40,7 @@ void main() {
|
||||
const float3 e = asfloat(s.Load3(32u));
|
||||
const float f = asfloat(s.Load(44u));
|
||||
const float2x3 g = tint_symbol_6(s, 48u);
|
||||
const float3x2 h = tint_symbol_8(s, 80u);
|
||||
const float3x2 h = tint_symbol_7(s, 80u);
|
||||
const Inner i = tint_symbol_9(s, 104u);
|
||||
const tint_padded_array_element j[4] = tint_symbol_10(s, 108u);
|
||||
return;
|
||||
|
||||
@@ -12,7 +12,7 @@ void tint_symbol_6(RWByteAddressBuffer buffer, uint offset, float2x3 value) {
|
||||
buffer.Store3((offset + 16u), asuint(value[1u]));
|
||||
}
|
||||
|
||||
void tint_symbol_8(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
|
||||
void tint_symbol_7(RWByteAddressBuffer buffer, uint offset, float3x2 value) {
|
||||
buffer.Store2((offset + 0u), asuint(value[0u]));
|
||||
buffer.Store2((offset + 8u), asuint(value[1u]));
|
||||
buffer.Store2((offset + 16u), asuint(value[2u]));
|
||||
@@ -23,10 +23,12 @@ void tint_symbol_9(RWByteAddressBuffer buffer, uint offset, Inner value) {
|
||||
}
|
||||
|
||||
void tint_symbol_10(RWByteAddressBuffer buffer, uint offset, tint_padded_array_element value[4]) {
|
||||
tint_symbol_9(buffer, (offset + 0u), value[0u].el);
|
||||
tint_symbol_9(buffer, (offset + 16u), value[1u].el);
|
||||
tint_symbol_9(buffer, (offset + 32u), value[2u].el);
|
||||
tint_symbol_9(buffer, (offset + 48u), value[3u].el);
|
||||
tint_padded_array_element array[4] = value;
|
||||
{
|
||||
for(uint i_1 = 0u; (i_1 < 4u); i_1 = (i_1 + 1u)) {
|
||||
tint_symbol_9(buffer, (offset + (i_1 * 16u)), array[i_1].el);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[numthreads(1, 1, 1)]
|
||||
@@ -38,7 +40,7 @@ void main() {
|
||||
s.Store3(32u, asuint(float3(0.0f, 0.0f, 0.0f)));
|
||||
s.Store(44u, asuint(0.0f));
|
||||
tint_symbol_6(s, 48u, float2x3(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||
tint_symbol_8(s, 80u, float3x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||
tint_symbol_7(s, 80u, float3x2(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f));
|
||||
const Inner tint_symbol_11 = (Inner)0;
|
||||
tint_symbol_9(s, 104u, tint_symbol_11);
|
||||
const tint_padded_array_element tint_symbol_12[4] = (tint_padded_array_element[4])0;
|
||||
|
||||
Reference in New Issue
Block a user