Skip to content

Commit a4bae3f

Browse files
dj2Dawn LUCI CQ
authored andcommitted
[ir] Rename sampler in multiplanar transform.
The use of `sampler` can conflict with backend, rename it to be `tint_sampler` to avoid any conflicts. Change-Id: Ibd9af0ccbc3257178d11d37a78fb79cd57d62eb6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/212196 Reviewed-by: Antonio Maiorano <[email protected]> Commit-Queue: dan sinclair <[email protected]> Auto-Submit: dan sinclair <[email protected]>
1 parent 6e7ba51 commit a4bae3f

File tree

10 files changed

+65
-90
lines changed

10 files changed

+65
-90
lines changed

src/tint/lang/core/ir/transform/multiplanar_external_texture.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ struct State {
527527
auto* plane_0 = b.FunctionParam("plane_0", SampledTexture());
528528
auto* plane_1 = b.FunctionParam("plane_1", SampledTexture());
529529
auto* params = b.FunctionParam("params", ExternalTextureParams());
530-
auto* sampler = b.FunctionParam("sampler", ty.sampler());
530+
auto* sampler = b.FunctionParam("tint_sampler", ty.sampler());
531531
auto* coords = b.FunctionParam("coords", ty.vec2<f32>());
532532
texture_sample_external->SetParams({plane_0, plane_1, params, sampler, coords});
533533
b.Append(texture_sample_external->Block(), [&] {

src/tint/lang/core/ir/transform/multiplanar_external_texture_test.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ tint_ExternalTextureParams = struct @align(16) {
682682
ret %result
683683
}
684684
}
685-
%tint_TextureSampleExternal = func(%plane_0:texture_2d<f32>, %plane_1:texture_2d<f32>, %params:tint_ExternalTextureParams, %sampler_1:sampler, %coords_1:vec2<f32>):vec4<f32> { # %sampler_1: 'sampler', %coords_1: 'coords'
685+
%tint_TextureSampleExternal = func(%plane_0:texture_2d<f32>, %plane_1:texture_2d<f32>, %params:tint_ExternalTextureParams, %tint_sampler:sampler, %coords_1:vec2<f32>):vec4<f32> { # %coords_1: 'coords'
686686
$B3: {
687687
%17:u32 = access %params, 1u
688688
%18:mat3x4<f32> = access %params, 2u
@@ -698,16 +698,16 @@ tint_ExternalTextureParams = struct @align(16) {
698698
%28:bool = eq %27, 1u
699699
%29:vec3<f32>, %30:f32 = if %28 [t: $B4, f: $B5] { # if_1
700700
$B4: { # true
701-
%31:vec4<f32> = textureSampleLevel %plane_0, %sampler_1, %26, 0.0f
701+
%31:vec4<f32> = textureSampleLevel %plane_0, %tint_sampler, %26, 0.0f
702702
%32:vec3<f32> = swizzle %31, xyz
703703
%33:f32 = access %31, 3u
704704
exit_if %32, %33 # if_1
705705
}
706706
$B5: { # false
707-
%34:vec4<f32> = textureSampleLevel %plane_0, %sampler_1, %26, 0.0f
707+
%34:vec4<f32> = textureSampleLevel %plane_0, %tint_sampler, %26, 0.0f
708708
%35:f32 = access %34, 0u
709709
%36:vec2<f32> = clamp %25, %22, %23
710-
%37:vec4<f32> = textureSampleLevel %plane_1, %sampler_1, %36, 0.0f
710+
%37:vec4<f32> = textureSampleLevel %plane_1, %tint_sampler, %36, 0.0f
711711
%38:vec2<f32> = swizzle %37, xy
712712
%39:vec4<f32> = construct %35, %38, 1.0f
713713
%40:vec3<f32> = mul %39, %18
@@ -870,7 +870,7 @@ tint_ExternalTextureParams = struct @align(16) {
870870
ret %result_1
871871
}
872872
}
873-
%tint_TextureSampleExternal = func(%plane_0:texture_2d<f32>, %plane_1:texture_2d<f32>, %params:tint_ExternalTextureParams, %sampler_2:sampler, %coords_2:vec2<f32>):vec4<f32> { # %sampler_2: 'sampler', %coords_2: 'coords'
873+
%tint_TextureSampleExternal = func(%plane_0:texture_2d<f32>, %plane_1:texture_2d<f32>, %params:tint_ExternalTextureParams, %tint_sampler:sampler, %coords_2:vec2<f32>):vec4<f32> { # %coords_2: 'coords'
874874
$B4: {
875875
%24:u32 = access %params, 1u
876876
%25:mat3x4<f32> = access %params, 2u
@@ -886,16 +886,16 @@ tint_ExternalTextureParams = struct @align(16) {
886886
%35:bool = eq %34, 1u
887887
%36:vec3<f32>, %37:f32 = if %35 [t: $B5, f: $B6] { # if_1
888888
$B5: { # true
889-
%38:vec4<f32> = textureSampleLevel %plane_0, %sampler_2, %33, 0.0f
889+
%38:vec4<f32> = textureSampleLevel %plane_0, %tint_sampler, %33, 0.0f
890890
%39:vec3<f32> = swizzle %38, xyz
891891
%40:f32 = access %38, 3u
892892
exit_if %39, %40 # if_1
893893
}
894894
$B6: { # false
895-
%41:vec4<f32> = textureSampleLevel %plane_0, %sampler_2, %33, 0.0f
895+
%41:vec4<f32> = textureSampleLevel %plane_0, %tint_sampler, %33, 0.0f
896896
%42:f32 = access %41, 0u
897897
%43:vec2<f32> = clamp %32, %29, %30
898-
%44:vec4<f32> = textureSampleLevel %plane_1, %sampler_2, %43, 0.0f
898+
%44:vec4<f32> = textureSampleLevel %plane_1, %tint_sampler, %43, 0.0f
899899
%45:vec2<f32> = swizzle %44, xy
900900
%46:vec4<f32> = construct %42, %45, 1.0f
901901
%47:vec3<f32> = mul %46, %25
@@ -1091,7 +1091,7 @@ tint_ExternalTextureParams = struct @align(16) {
10911091
ret %33
10921092
}
10931093
}
1094-
%tint_TextureSampleExternal = func(%plane_0:texture_2d<f32>, %plane_1:texture_2d<f32>, %params:tint_ExternalTextureParams, %sampler_2:sampler, %coords_2:vec2<f32>):vec4<f32> { # %sampler_2: 'sampler', %coords_2: 'coords'
1094+
%tint_TextureSampleExternal = func(%plane_0:texture_2d<f32>, %plane_1:texture_2d<f32>, %params:tint_ExternalTextureParams, %tint_sampler:sampler, %coords_2:vec2<f32>):vec4<f32> { # %coords_2: 'coords'
10951095
$B4: {
10961096
%39:u32 = access %params, 1u
10971097
%40:mat3x4<f32> = access %params, 2u
@@ -1107,16 +1107,16 @@ tint_ExternalTextureParams = struct @align(16) {
11071107
%50:bool = eq %49, 1u
11081108
%51:vec3<f32>, %52:f32 = if %50 [t: $B5, f: $B6] { # if_1
11091109
$B5: { # true
1110-
%53:vec4<f32> = textureSampleLevel %plane_0, %sampler_2, %48, 0.0f
1110+
%53:vec4<f32> = textureSampleLevel %plane_0, %tint_sampler, %48, 0.0f
11111111
%54:vec3<f32> = swizzle %53, xyz
11121112
%55:f32 = access %53, 3u
11131113
exit_if %54, %55 # if_1
11141114
}
11151115
$B6: { # false
1116-
%56:vec4<f32> = textureSampleLevel %plane_0, %sampler_2, %48, 0.0f
1116+
%56:vec4<f32> = textureSampleLevel %plane_0, %tint_sampler, %48, 0.0f
11171117
%57:f32 = access %56, 0u
11181118
%58:vec2<f32> = clamp %47, %44, %45
1119-
%59:vec4<f32> = textureSampleLevel %plane_1, %sampler_2, %58, 0.0f
1119+
%59:vec4<f32> = textureSampleLevel %plane_1, %tint_sampler, %58, 0.0f
11201120
%60:vec2<f32> = swizzle %59, xy
11211121
%61:vec4<f32> = construct %57, %60, 1.0f
11221122
%62:vec3<f32> = mul %61, %40

test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
5252
return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
5353
}
5454

55-
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState sampler, float2 coords) {
55+
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
5656
float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
5757
float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
5858
float3 v_7 = (0.0f).xxx;
5959
float v_8 = 0.0f;
6060
if ((params.numPlanes == 1u)) {
61-
float4 v_9 = plane_0.SampleLevel(sampler, v_6, float(0.0f));
61+
float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
6262
v_7 = v_9.xyz;
6363
v_8 = v_9[3u];
6464
} else {
65-
float v_10 = plane_0.SampleLevel(sampler, v_6, float(0.0f))[0u];
65+
float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f))[0u];
6666
float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
67-
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(sampler, v_11, float(0.0f)).xy, 1.0f));
67+
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
6868
v_8 = 1.0f;
6969
}
7070
float3 v_12 = v_7;

test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
SKIP: FAILED
2-
31
struct tint_GammaTransferParams {
42
float G;
53
float A;
@@ -54,19 +52,19 @@ float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
5452
return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
5553
}
5654

57-
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState sampler, float2 coords) {
55+
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
5856
float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
5957
float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
6058
float3 v_7 = (0.0f).xxx;
6159
float v_8 = 0.0f;
6260
if ((params.numPlanes == 1u)) {
63-
float4 v_9 = plane_0.SampleLevel(sampler, v_6, float(0.0f));
61+
float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
6462
v_7 = v_9.xyz;
6563
v_8 = v_9[3u];
6664
} else {
67-
float v_10 = plane_0.SampleLevel(sampler, v_6, float(0.0f))[0u];
65+
float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f))[0u];
6866
float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
69-
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(sampler, v_11, float(0.0f)).xy, 1.0f));
67+
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
7068
v_8 = 1.0f;
7169
}
7270
float3 v_12 = v_7;
@@ -134,15 +132,13 @@ tint_ExternalTextureParams v_37(uint start_byte_offset) {
134132
uint4 v_54 = arg_0_params[((256u + start_byte_offset) / 16u)];
135133
uint2 v_55 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy));
136134
uint4 v_56 = arg_0_params[((264u + start_byte_offset) / 16u)];
137-
tint_GammaTransferParams v_57 = v_41;
138-
tint_GammaTransferParams v_58 = v_42;
139-
tint_ExternalTextureParams v_59 = {v_38, v_39, v_40, v_57, v_58, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
140-
return v_59;
135+
tint_ExternalTextureParams v_57 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
136+
return v_57;
141137
}
142138

143139
float4 textureSampleBaseClampToEdge_7c04e6() {
144-
tint_ExternalTextureParams v_60 = v_37(0u);
145-
float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_60, arg_1, (1.0f).xx);
140+
tint_ExternalTextureParams v_58 = v_37(0u);
141+
float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_58, arg_1, (1.0f).xx);
146142
return res;
147143
}
148144

@@ -159,21 +155,13 @@ VertexOutput vertex_main_inner() {
159155
VertexOutput tint_symbol = (VertexOutput)0;
160156
tint_symbol.pos = (0.0f).xxxx;
161157
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_7c04e6();
162-
VertexOutput v_61 = tint_symbol;
163-
return v_61;
158+
VertexOutput v_59 = tint_symbol;
159+
return v_59;
164160
}
165161

166162
vertex_main_outputs vertex_main() {
167-
VertexOutput v_62 = vertex_main_inner();
168-
VertexOutput v_63 = v_62;
169-
VertexOutput v_64 = v_62;
170-
vertex_main_outputs v_65 = {v_64.prevent_dce, v_63.pos};
171-
return v_65;
163+
VertexOutput v_60 = vertex_main_inner();
164+
vertex_main_outputs v_61 = {v_60.prevent_dce, v_60.pos};
165+
return v_61;
172166
}
173167

174-
FXC validation failure:
175-
<scrubbed_path>(55,137-143): error X3000: syntax error: unexpected token 'sampler'
176-
<scrubbed_path>(56,27-32): error X3004: undeclared identifier 'coords'
177-
178-
179-
tint executable returned error: exit status 1

test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.msl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,19 +90,19 @@ float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
9090
return select((v_4 * (powr(((params.A * v_3) + params.B), v_1) + params.E)), (v_4 * ((params.C * v_3) + params.F)), (v_3 < v_2));
9191
}
9292

93-
float4 tint_TextureSampleExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, sampler sampler, float2 coords) {
93+
float4 tint_TextureSampleExternal(texture2d<float, access::sample> plane_0, texture2d<float, access::sample> plane_1, tint_ExternalTextureParams params, sampler tint_sampler, float2 coords) {
9494
float2 const v_5 = (params.sampleTransform * float3(coords, 1.0f));
9595
float2 const v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
9696
float3 v_7 = 0.0f;
9797
float v_8 = 0.0f;
9898
if ((params.numPlanes == 1u)) {
99-
float4 const v_9 = plane_0.sample(sampler, v_6, level(0.0f));
99+
float4 const v_9 = plane_0.sample(tint_sampler, v_6, level(0.0f));
100100
v_7 = v_9.xyz;
101101
v_8 = v_9[3u];
102102
} else {
103-
float const v_10 = plane_0.sample(sampler, v_6, level(0.0f))[0u];
103+
float const v_10 = plane_0.sample(tint_sampler, v_6, level(0.0f))[0u];
104104
float2 const v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
105-
v_7 = (float4(v_10, plane_1.sample(sampler, v_11, level(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
105+
v_7 = (float4(v_10, plane_1.sample(tint_sampler, v_11, level(0.0f)).xy, 1.0f) * params.yuvToRgbConversionMatrix);
106106
v_8 = 1.0f;
107107
}
108108
float3 const v_12 = v_7;

test/tint/builtins/gen/literal/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.spvasm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
OpName %plane_0 "plane_0"
8080
OpName %plane_1 "plane_1"
8181
OpName %params "params"
82-
OpName %sampler "sampler"
82+
OpName %tint_sampler "tint_sampler"
8383
OpName %coords "coords"
8484
OpName %tint_GammaCorrection "tint_GammaCorrection"
8585
OpName %v "v"
@@ -256,7 +256,7 @@
256256
%plane_0 = OpFunctionParameter %8
257257
%plane_1 = OpFunctionParameter %8
258258
%params = OpFunctionParameter %tint_ExternalTextureParams
259-
%sampler = OpFunctionParameter %22
259+
%tint_sampler = OpFunctionParameter %22
260260
%coords = OpFunctionParameter %v2float
261261
%80 = OpLabel
262262
%81 = OpCompositeExtract %uint %params 1
@@ -274,17 +274,17 @@
274274
OpSelectionMerge %95 None
275275
OpBranchConditional %93 %96 %97
276276
%96 = OpLabel
277-
%98 = OpSampledImage %99 %plane_0 %sampler
277+
%98 = OpSampledImage %99 %plane_0 %tint_sampler
278278
%100 = OpImageSampleExplicitLod %v4float %98 %90 Lod %float_0
279279
%102 = OpVectorShuffle %v3float %100 %100 0 1 2
280280
%103 = OpCompositeExtract %float %100 3
281281
OpBranch %95
282282
%97 = OpLabel
283-
%104 = OpSampledImage %99 %plane_0 %sampler
283+
%104 = OpSampledImage %99 %plane_0 %tint_sampler
284284
%105 = OpImageSampleExplicitLod %v4float %104 %90 Lod %float_0
285285
%106 = OpCompositeExtract %float %105 0
286286
%107 = OpExtInst %v2float %91 NClamp %89 %86 %87
287-
%108 = OpSampledImage %99 %plane_1 %sampler
287+
%108 = OpSampledImage %99 %plane_1 %tint_sampler
288288
%109 = OpImageSampleExplicitLod %v4float %108 %107 Lod %float_0
289289
%110 = OpVectorShuffle %v2float %109 %109 0 1
290290
%111 = OpCompositeConstruct %v4float %106 %110 %float_1

test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.dxc.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,19 +52,19 @@ float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
5252
return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
5353
}
5454

55-
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState sampler, float2 coords) {
55+
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
5656
float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
5757
float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
5858
float3 v_7 = (0.0f).xxx;
5959
float v_8 = 0.0f;
6060
if ((params.numPlanes == 1u)) {
61-
float4 v_9 = plane_0.SampleLevel(sampler, v_6, float(0.0f));
61+
float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
6262
v_7 = v_9.xyz;
6363
v_8 = v_9[3u];
6464
} else {
65-
float v_10 = plane_0.SampleLevel(sampler, v_6, float(0.0f))[0u];
65+
float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f))[0u];
6666
float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
67-
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(sampler, v_11, float(0.0f)).xy, 1.0f));
67+
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
6868
v_8 = 1.0f;
6969
}
7070
float3 v_12 = v_7;

test/tint/builtins/gen/var/textureSampleBaseClampToEdge/7c04e6.wgsl.expected.ir.fxc.hlsl

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
SKIP: FAILED
2-
31
struct tint_GammaTransferParams {
42
float G;
53
float A;
@@ -54,19 +52,19 @@ float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) {
5452
return (((v_3 < v_2)) ? ((v_4 * ((params.C * v_3) + params.F))) : ((v_4 * (pow(((params.A * v_3) + params.B), v_1) + params.E))));
5553
}
5654

57-
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState sampler, float2 coords) {
55+
float4 tint_TextureSampleExternal(Texture2D<float4> plane_0, Texture2D<float4> plane_1, tint_ExternalTextureParams params, SamplerState tint_sampler, float2 coords) {
5856
float2 v_5 = mul(float3(coords, 1.0f), params.sampleTransform);
5957
float2 v_6 = clamp(v_5, params.samplePlane0RectMin, params.samplePlane0RectMax);
6058
float3 v_7 = (0.0f).xxx;
6159
float v_8 = 0.0f;
6260
if ((params.numPlanes == 1u)) {
63-
float4 v_9 = plane_0.SampleLevel(sampler, v_6, float(0.0f));
61+
float4 v_9 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f));
6462
v_7 = v_9.xyz;
6563
v_8 = v_9[3u];
6664
} else {
67-
float v_10 = plane_0.SampleLevel(sampler, v_6, float(0.0f))[0u];
65+
float v_10 = plane_0.SampleLevel(tint_sampler, v_6, float(0.0f))[0u];
6866
float2 v_11 = clamp(v_5, params.samplePlane1RectMin, params.samplePlane1RectMax);
69-
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(sampler, v_11, float(0.0f)).xy, 1.0f));
67+
v_7 = mul(params.yuvToRgbConversionMatrix, float4(v_10, plane_1.SampleLevel(tint_sampler, v_11, float(0.0f)).xy, 1.0f));
7068
v_8 = 1.0f;
7169
}
7270
float3 v_12 = v_7;
@@ -134,17 +132,14 @@ tint_ExternalTextureParams v_37(uint start_byte_offset) {
134132
uint4 v_54 = arg_0_params[((256u + start_byte_offset) / 16u)];
135133
uint2 v_55 = ((((((256u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_54.zw) : (v_54.xy));
136134
uint4 v_56 = arg_0_params[((264u + start_byte_offset) / 16u)];
137-
tint_GammaTransferParams v_57 = v_41;
138-
tint_GammaTransferParams v_58 = v_42;
139-
tint_ExternalTextureParams v_59 = {v_38, v_39, v_40, v_57, v_58, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
140-
return v_59;
135+
tint_ExternalTextureParams v_57 = {v_38, v_39, v_40, v_41, v_42, v_43, v_44, v_45, v_47, v_49, v_51, v_53, v_55, asfloat(((((((264u + start_byte_offset) % 16u) / 4u) == 2u)) ? (v_56.zw) : (v_56.xy)))};
136+
return v_57;
141137
}
142138

143139
float4 textureSampleBaseClampToEdge_7c04e6() {
144140
float2 arg_2 = (1.0f).xx;
145-
tint_ExternalTextureParams v_60 = v_37(0u);
146-
tint_ExternalTextureParams v_61 = v_60;
147-
float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_61, arg_1, arg_2);
141+
tint_ExternalTextureParams v_58 = v_37(0u);
142+
float4 res = tint_TextureSampleExternal(arg_0_plane0, arg_0_plane1, v_58, arg_1, arg_2);
148143
return res;
149144
}
150145

@@ -161,21 +156,13 @@ VertexOutput vertex_main_inner() {
161156
VertexOutput tint_symbol = (VertexOutput)0;
162157
tint_symbol.pos = (0.0f).xxxx;
163158
tint_symbol.prevent_dce = textureSampleBaseClampToEdge_7c04e6();
164-
VertexOutput v_62 = tint_symbol;
165-
return v_62;
159+
VertexOutput v_59 = tint_symbol;
160+
return v_59;
166161
}
167162

168163
vertex_main_outputs vertex_main() {
169-
VertexOutput v_63 = vertex_main_inner();
170-
VertexOutput v_64 = v_63;
171-
VertexOutput v_65 = v_63;
172-
vertex_main_outputs v_66 = {v_65.prevent_dce, v_64.pos};
173-
return v_66;
164+
VertexOutput v_60 = vertex_main_inner();
165+
vertex_main_outputs v_61 = {v_60.prevent_dce, v_60.pos};
166+
return v_61;
174167
}
175168

176-
FXC validation failure:
177-
<scrubbed_path>(55,137-143): error X3000: syntax error: unexpected token 'sampler'
178-
<scrubbed_path>(56,27-32): error X3004: undeclared identifier 'coords'
179-
180-
181-
tint executable returned error: exit status 1

0 commit comments

Comments
 (0)