[tint][hlsl] Polyfill texture sample bias clamping
This is for the hlsl AST backend only.
Bug:371033198
Change-Id: Ibaa3a0618fcdbf803935f222a100016b904aaa69
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/211394
Commit-Queue: Peter McNeeley <petermcneeley@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc b/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc
index 032fc3a..51d6955 100644
--- a/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc
+++ b/src/tint/lang/hlsl/writer/ast_printer/ast_printer.cc
@@ -2993,9 +2993,15 @@
}
if (auto* e = arg(usage)) {
out << ", ";
+ if (usage == Usage::kBias) {
+ out << "clamp(";
+ }
if (!EmitTextureOrStorageBufferCallArgExpression(out, e)) {
return false;
}
+ if (usage == Usage::kBias) {
+ out << ", -16.0f, 15.99f)";
+ }
}
}
diff --git a/src/tint/lang/hlsl/writer/ast_printer/builtin_texture_test.cc b/src/tint/lang/hlsl/writer/ast_printer/builtin_texture_test.cc
index 0c63bcb..ef0918f 100644
--- a/src/tint/lang/hlsl/writer/ast_printer/builtin_texture_test.cc
+++ b/src/tint/lang/hlsl/writer/ast_printer/builtin_texture_test.cc
@@ -252,21 +252,21 @@
case ValidTextureOverload::kSampleDepthCubeArrayF32:
return R"(tint_symbol.Sample(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(4u))).x;)";
case ValidTextureOverload::kSampleBias2dF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), clamp(3.0f, -16.0f, 15.99f));)";
case ValidTextureOverload::kSampleBias2dOffsetF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), 3.0f, int2(4, 5));)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float2(1.0f, 2.0f), clamp(3.0f, -16.0f, 15.99f), int2(4, 5));)";
case ValidTextureOverload::kSampleBias2dArrayF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(4u)), 3.0f);)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(4u)), clamp(3.0f, -16.0f, 15.99f));)";
case ValidTextureOverload::kSampleBias2dArrayOffsetF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(3)), 4.0f, int2(5, 6));)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, float(3)), clamp(4.0f, -16.0f, 15.99f), int2(5, 6));)";
case ValidTextureOverload::kSampleBias3dF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), clamp(4.0f, -16.0f, 15.99f));)";
case ValidTextureOverload::kSampleBias3dOffsetF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f, int3(5, 6, 7));)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), clamp(4.0f, -16.0f, 15.99f), int3(5, 6, 7));)";
case ValidTextureOverload::kSampleBiasCubeF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), 4.0f);)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float3(1.0f, 2.0f, 3.0f), clamp(4.0f, -16.0f, 15.99f));)";
case ValidTextureOverload::kSampleBiasCubeArrayF32:
- return R"(tint_symbol.SampleBias(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(3)), 4.0f);)";
+ return R"(tint_symbol.SampleBias(tint_symbol_1, float4(1.0f, 2.0f, 3.0f, float(3)), clamp(4.0f, -16.0f, 15.99f));)";
case ValidTextureOverload::kSampleLevel2dF32:
return R"(tint_symbol.SampleLevel(tint_symbol_1, float2(1.0f, 2.0f), 3.0f);)";
case ValidTextureOverload::kSampleLevel2dOffsetF32:
diff --git a/test/tint/bug/tint/1703.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/1703.wgsl.expected.dxc.hlsl
index 74eee87..cf5935c 100644
--- a/test/tint/bug/tint/1703.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/1703.wgsl.expected.dxc.hlsl
@@ -16,7 +16,7 @@
vb2.x = (asfloat(my_uniform[0].x) == -1.0f);
vb2 = bool2((asfloat(my_uniform[0].x) == -1.0f), false);
if (vb2.x) {
- float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, 0.0f);
+ float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, clamp(0.0f, -16.0f, 15.99f));
}
}
@@ -26,6 +26,6 @@
vb2.x = (asfloat(my_uniform[0].x) == -1.0f);
vb2 = (false).xx;
if (vb2.x) {
- float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, 0.0f);
+ float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, clamp(0.0f, -16.0f, 15.99f));
}
}
diff --git a/test/tint/bug/tint/1703.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/1703.wgsl.expected.fxc.hlsl
index 74eee87..cf5935c 100644
--- a/test/tint/bug/tint/1703.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/1703.wgsl.expected.fxc.hlsl
@@ -16,7 +16,7 @@
vb2.x = (asfloat(my_uniform[0].x) == -1.0f);
vb2 = bool2((asfloat(my_uniform[0].x) == -1.0f), false);
if (vb2.x) {
- float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, 0.0f);
+ float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, clamp(0.0f, -16.0f, 15.99f));
}
}
@@ -26,6 +26,6 @@
vb2.x = (asfloat(my_uniform[0].x) == -1.0f);
vb2 = (false).xx;
if (vb2.x) {
- float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, 0.0f);
+ float4 r = my_texture.SampleBias(my_sampler, (0.0f).xx, clamp(0.0f, -16.0f, 15.99f));
}
}
diff --git a/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl b/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl
index e49142b..c42d2cf 100644
--- a/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl
+++ b/test/tint/bug/tint/948.wgsl.expected.dxc.hlsl
@@ -29,11 +29,11 @@
float x_25 = asfloat(x_20[6].w);
fX = (x_15 / x_25);
float x_37 = fX;
- float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, float2(x_37, 0.0f), 0.0f);
+ float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, float2(x_37, 0.0f), clamp(0.0f, -16.0f, 15.99f));
float x_44 = fX;
- float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, float2(x_44, 0.25f), 0.0f);
+ float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, float2(x_44, 0.25f), clamp(0.0f, -16.0f, 15.99f));
float x_51 = fX;
- float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, float2(x_51, 0.5f), 0.0f);
+ float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, float2(x_51, 0.5f), clamp(0.0f, -16.0f, 15.99f));
return float4x4(float4(x_40.x, x_40.y, x_40.z, x_40.w), float4(x_47.x, x_47.y, x_47.z, x_47.w), float4(x_54.x, x_54.y, x_54.z, x_54.w), (0.0f).xxxx);
}
@@ -85,14 +85,14 @@
case 1: {
float2 x_150 = tileID;
float2 x_154 = asfloat(x_20[5].zw);
- float4 x_156 = tileMapsTexture1.SampleBias(tileMapsSampler, ((x_150 + (0.5f).xx) / x_154), 0.0f);
+ float4 x_156 = tileMapsTexture1.SampleBias(tileMapsSampler, ((x_150 + (0.5f).xx) / x_154), clamp(0.0f, -16.0f, 15.99f));
frameID_1 = x_156.x;
break;
}
case 0: {
float2 x_136 = tileID;
float2 x_140 = asfloat(x_20[5].zw);
- float4 x_142 = tileMapsTexture0.SampleBias(tileMapsSampler, ((x_136 + (0.5f).xx) / x_140), 0.0f);
+ float4 x_142 = tileMapsTexture0.SampleBias(tileMapsSampler, ((x_136 + (0.5f).xx) / x_140), clamp(0.0f, -16.0f, 15.99f));
frameID_1 = x_142.x;
break;
}
@@ -102,7 +102,7 @@
}
float x_166 = frameID_1;
float x_169 = asfloat(x_20[6].w);
- float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, float2(((x_166 + 0.5f) / x_169), 0.0f), 0.0f);
+ float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, float2(((x_166 + 0.5f) / x_169), 0.0f), clamp(0.0f, -16.0f, 15.99f));
animationData = x_172;
float x_174 = animationData.y;
if ((x_174 > 0.0f)) {
diff --git a/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl b/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl
index e49142b..c42d2cf 100644
--- a/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl
+++ b/test/tint/bug/tint/948.wgsl.expected.fxc.hlsl
@@ -29,11 +29,11 @@
float x_25 = asfloat(x_20[6].w);
fX = (x_15 / x_25);
float x_37 = fX;
- float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, float2(x_37, 0.0f), 0.0f);
+ float4 x_40 = frameMapTexture.SampleBias(frameMapSampler, float2(x_37, 0.0f), clamp(0.0f, -16.0f, 15.99f));
float x_44 = fX;
- float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, float2(x_44, 0.25f), 0.0f);
+ float4 x_47 = frameMapTexture.SampleBias(frameMapSampler, float2(x_44, 0.25f), clamp(0.0f, -16.0f, 15.99f));
float x_51 = fX;
- float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, float2(x_51, 0.5f), 0.0f);
+ float4 x_54 = frameMapTexture.SampleBias(frameMapSampler, float2(x_51, 0.5f), clamp(0.0f, -16.0f, 15.99f));
return float4x4(float4(x_40.x, x_40.y, x_40.z, x_40.w), float4(x_47.x, x_47.y, x_47.z, x_47.w), float4(x_54.x, x_54.y, x_54.z, x_54.w), (0.0f).xxxx);
}
@@ -85,14 +85,14 @@
case 1: {
float2 x_150 = tileID;
float2 x_154 = asfloat(x_20[5].zw);
- float4 x_156 = tileMapsTexture1.SampleBias(tileMapsSampler, ((x_150 + (0.5f).xx) / x_154), 0.0f);
+ float4 x_156 = tileMapsTexture1.SampleBias(tileMapsSampler, ((x_150 + (0.5f).xx) / x_154), clamp(0.0f, -16.0f, 15.99f));
frameID_1 = x_156.x;
break;
}
case 0: {
float2 x_136 = tileID;
float2 x_140 = asfloat(x_20[5].zw);
- float4 x_142 = tileMapsTexture0.SampleBias(tileMapsSampler, ((x_136 + (0.5f).xx) / x_140), 0.0f);
+ float4 x_142 = tileMapsTexture0.SampleBias(tileMapsSampler, ((x_136 + (0.5f).xx) / x_140), clamp(0.0f, -16.0f, 15.99f));
frameID_1 = x_142.x;
break;
}
@@ -102,7 +102,7 @@
}
float x_166 = frameID_1;
float x_169 = asfloat(x_20[6].w);
- float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, float2(((x_166 + 0.5f) / x_169), 0.0f), 0.0f);
+ float4 x_172 = animationMapTexture.SampleBias(animationMapSampler, float2(((x_166 + 0.5f) / x_169), 0.0f), clamp(0.0f, -16.0f, 15.99f));
animationData = x_172;
float x_174 = animationData.y;
if ((x_174 > 0.0f)) {
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 3f4395e..1a8a4d8 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_1c707e() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 3f4395e..1a8a4d8 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_1c707e() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 4a32ef0..8b108c4 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_53b9f7() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 4a32ef0..8b108c4 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_53b9f7() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 c0adccd..c29567d 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_594824() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f, int3((1).xxx));
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, clamp(1.0f, -16.0f, 15.99f), int3((1).xxx));
return res;
}
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 c0adccd..c29567d 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_594824() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f, int3((1).xxx));
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, clamp(1.0f, -16.0f, 15.99f), int3((1).xxx));
return res;
}
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 be822f8..df5c027 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_6a9113() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 be822f8..df5c027 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_6a9113() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 108f251..04da657 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_80e579() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 108f251..04da657 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_80e579() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 37be413..7707f59 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_87915c() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 37be413..7707f59 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_87915c() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), 1.0f, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1u)), clamp(1.0f, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 32cffb2..b37b305 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_9dbb51() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), clamp(1.0f, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 32cffb2..b37b305 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_9dbb51() {
- float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), 1.0f, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3((1.0f).xx, float(1)), clamp(1.0f, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 e86a1eb..0f2888c 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_a161cf() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, clamp(1.0f, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 e86a1eb..0f2888c 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_a161cf() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, 1.0f, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xx, clamp(1.0f, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 f7e29f5..e143a2b 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_c6953d() {
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 f7e29f5..e143a2b 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_c6953d() {
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1u)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 e6927cc..c7c5473 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_d3fa1b() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 e6927cc..c7c5473 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_d3fa1b() {
- float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, (1.0f).xxx, clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 d9a86eb..3c3f543 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_eed7c4() {
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 d9a86eb..3c3f543 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
@@ -3,7 +3,7 @@
SamplerState arg_1 : register(s1, space1);
float4 textureSampleBias_eed7c4() {
- float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), 1.0f);
+ float4 res = arg_0.SampleBias(arg_1, float4((1.0f).xxx, float(1)), clamp(1.0f, -16.0f, 15.99f));
return res;
}
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 b3968d7..d48cbbc 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}
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 b3968d7..d48cbbc 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}
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 f0d0b31..b0bd614 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_53b9f7() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f));
return res;
}
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 f0d0b31..b0bd614 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_53b9f7() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f));
return res;
}
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 1947436..89b1045 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_594824() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, int3((1).xxx));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f), int3((1).xxx));
return res;
}
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 1947436..89b1045 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_594824() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, int3((1).xxx));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f), int3((1).xxx));
return res;
}
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 df51683..7cfca5e 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_6a9113() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f));
return res;
}
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 df51683..7cfca5e 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_6a9113() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f));
return res;
}
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 e46f704..d399cb8 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}
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 e46f704..d399cb8 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}
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 9baa16a..669b2ef 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
@@ -6,7 +6,7 @@
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, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 9baa16a..669b2ef 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
@@ -6,7 +6,7 @@
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, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 889e10e..e755fbb 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
@@ -6,7 +6,7 @@
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, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 889e10e..e755fbb 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
@@ -6,7 +6,7 @@
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, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, float3(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 90680d4..590e937 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_a161cf() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 90680d4..590e937 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_a161cf() {
float2 arg_2 = (1.0f).xx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3, int2((1).xx));
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f), int2((1).xx));
return res;
}
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 d457992..432805d 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}
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 d457992..432805d 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}
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 9071192..e11d3f5 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_d3fa1b() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f));
return res;
}
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 9071192..e11d3f5 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
@@ -5,7 +5,7 @@
float4 textureSampleBias_d3fa1b() {
float3 arg_2 = (1.0f).xxx;
float arg_3 = 1.0f;
- float4 res = arg_0.SampleBias(arg_1, arg_2, arg_3);
+ float4 res = arg_0.SampleBias(arg_1, arg_2, clamp(arg_3, -16.0f, 15.99f));
return res;
}
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 f5e0ae6..6e824f1 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}
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 f5e0ae6..6e824f1 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
@@ -6,7 +6,7 @@
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);
+ float4 res = arg_0.SampleBias(arg_1, float4(arg_2, float(arg_3)), clamp(arg_4, -16.0f, 15.99f));
return res;
}