mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
spirv-reader: Sink pointer-to-vector-component
WGSL does not support pointer-to-vector-component, so the SPIR-V reader needs to sink these pointers into their use. Bug: tint:491 Change-Id: Ib5ae87d2f6bbac13280314ba11369d7ced505b56 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/68241 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
@@ -36,42 +36,34 @@ fn pointInTriangle_vf2_vf2_vf2_vf2_(p : ptr<function, vec2<f32>>, a_1 : ptr<func
|
||||
var x_173_phi : i32;
|
||||
switch(0u) {
|
||||
default: {
|
||||
let x_94 : ptr<function, f32> = &((*(p)).x);
|
||||
let x_95 : f32 = *(x_94);
|
||||
let x_96 : ptr<function, f32> = &((*(a_1)).x);
|
||||
let x_97 : f32 = *(x_96);
|
||||
let x_99 : ptr<function, f32> = &((*(p)).y);
|
||||
let x_100 : f32 = *(x_99);
|
||||
let x_101 : ptr<function, f32> = &((*(a_1)).y);
|
||||
let x_102 : f32 = *(x_101);
|
||||
let x_105 : ptr<function, f32> = &((*(b_1)).x);
|
||||
let x_106 : f32 = *(x_105);
|
||||
let x_107 : f32 = *(x_96);
|
||||
let x_109 : ptr<function, f32> = &((*(b_1)).y);
|
||||
let x_110 : f32 = *(x_109);
|
||||
let x_111 : f32 = *(x_101);
|
||||
let x_95 : f32 = (*(p)).x;
|
||||
let x_97 : f32 = (*(a_1)).x;
|
||||
let x_100 : f32 = (*(p)).y;
|
||||
let x_102 : f32 = (*(a_1)).y;
|
||||
let x_106 : f32 = (*(b_1)).x;
|
||||
let x_107 : f32 = (*(a_1)).x;
|
||||
let x_110 : f32 = (*(b_1)).y;
|
||||
let x_111 : f32 = (*(a_1)).y;
|
||||
param = vec2<f32>((x_95 - x_97), (x_100 - x_102));
|
||||
param_1 = vec2<f32>((x_106 - x_107), (x_110 - x_111));
|
||||
let x_114 : f32 = cross2d_vf2_vf2_(&(param), &(param_1));
|
||||
pab = x_114;
|
||||
let x_115 : f32 = *(x_94);
|
||||
let x_116 : f32 = *(x_105);
|
||||
let x_118 : f32 = *(x_99);
|
||||
let x_119 : f32 = *(x_109);
|
||||
let x_122 : ptr<function, f32> = &((*(c)).x);
|
||||
let x_123 : f32 = *(x_122);
|
||||
let x_124 : f32 = *(x_105);
|
||||
let x_126 : ptr<function, f32> = &((*(c)).y);
|
||||
let x_127 : f32 = *(x_126);
|
||||
let x_128 : f32 = *(x_109);
|
||||
let x_115 : f32 = (*(p)).x;
|
||||
let x_116 : f32 = (*(b_1)).x;
|
||||
let x_118 : f32 = (*(p)).y;
|
||||
let x_119 : f32 = (*(b_1)).y;
|
||||
let x_123 : f32 = (*(c)).x;
|
||||
let x_124 : f32 = (*(b_1)).x;
|
||||
let x_127 : f32 = (*(c)).y;
|
||||
let x_128 : f32 = (*(b_1)).y;
|
||||
param_2 = vec2<f32>((x_115 - x_116), (x_118 - x_119));
|
||||
param_3 = vec2<f32>((x_123 - x_124), (x_127 - x_128));
|
||||
let x_131 : f32 = cross2d_vf2_vf2_(&(param_2), &(param_3));
|
||||
pbc = x_131;
|
||||
let x_134 : bool = ((x_114 < 0.0) && (x_131 < 0.0));
|
||||
let x_134 : bool = ((x_114 < 0.0) & (x_131 < 0.0));
|
||||
x_141_phi = x_134;
|
||||
if (!(x_134)) {
|
||||
x_140 = ((x_114 >= 0.0) && (x_131 >= 0.0));
|
||||
x_140 = ((x_114 >= 0.0) & (x_131 >= 0.0));
|
||||
x_141_phi = x_140;
|
||||
}
|
||||
let x_141 : bool = x_141_phi;
|
||||
@@ -81,22 +73,22 @@ fn pointInTriangle_vf2_vf2_vf2_vf2_(p : ptr<function, vec2<f32>>, a_1 : ptr<func
|
||||
x_173_phi = 0;
|
||||
break;
|
||||
}
|
||||
let x_145 : f32 = *(x_94);
|
||||
let x_146 : f32 = *(x_122);
|
||||
let x_148 : f32 = *(x_99);
|
||||
let x_149 : f32 = *(x_126);
|
||||
let x_152 : f32 = *(x_96);
|
||||
let x_153 : f32 = *(x_122);
|
||||
let x_155 : f32 = *(x_101);
|
||||
let x_156 : f32 = *(x_126);
|
||||
let x_145 : f32 = (*(p)).x;
|
||||
let x_146 : f32 = (*(c)).x;
|
||||
let x_148 : f32 = (*(p)).y;
|
||||
let x_149 : f32 = (*(c)).y;
|
||||
let x_152 : f32 = (*(a_1)).x;
|
||||
let x_153 : f32 = (*(c)).x;
|
||||
let x_155 : f32 = (*(a_1)).y;
|
||||
let x_156 : f32 = (*(c)).y;
|
||||
param_4 = vec2<f32>((x_145 - x_146), (x_148 - x_149));
|
||||
param_5 = vec2<f32>((x_152 - x_153), (x_155 - x_156));
|
||||
let x_159 : f32 = cross2d_vf2_vf2_(&(param_4), &(param_5));
|
||||
pca = x_159;
|
||||
let x_162 : bool = ((x_114 < 0.0) && (x_159 < 0.0));
|
||||
let x_162 : bool = ((x_114 < 0.0) & (x_159 < 0.0));
|
||||
x_169_phi = x_162;
|
||||
if (!(x_162)) {
|
||||
x_168 = ((x_114 >= 0.0) && (x_159 >= 0.0));
|
||||
x_168 = ((x_114 >= 0.0) & (x_159 >= 0.0));
|
||||
x_169_phi = x_168;
|
||||
}
|
||||
let x_169 : bool = x_169_phi;
|
||||
|
||||
Reference in New Issue
Block a user