writer/msl: Output constant 0 lod for 1d texture builtins

The MSL headers have annotations that requires that the lod for 1D
textures is a constexpr with value 0. This affects .get_width() and
.read().

Bug: dawn:814

Change-Id: Ic21d32067061afe67a16fbbeee222ab695b53066
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/79301
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2022-02-04 17:55:43 +00:00
committed by Tint LUCI CQ
parent a924ffe70c
commit b3c99ddfae
21 changed files with 40 additions and 28 deletions

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_002b2a(texture1d<float, access::sample> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_08753d(texture1d<int, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_0cce40(texture1d<int, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_1e9e39(texture1d<float, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_318ecc(texture1d<uint, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_3aca08(texture1d<float, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_423f99(texture1d<int, access::sample> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_42d4e6(texture1d<float, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_4df9a8(texture1d<uint, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_55b23e(texture1d<float, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_57da0b(texture1d<uint, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_5caa5e(texture1d<uint, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_6adac6(texture1d<int, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_9da9e2(texture1d<int, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_a7d565(texture1d<uint, access::sample> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_a863f2(texture1d<float, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_cc968c(texture1d<int, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_cccc8f(texture1d<float, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {

View File

@@ -6,7 +6,7 @@ struct tint_symbol {
};
void textureDimensions_dc2dd0(texture1d<uint, access::write> tint_symbol_1) {
int res = int(tint_symbol_1.get_width());
int res = int(tint_symbol_1.get_width(0));
}
float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {