mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
spirv-reader: polyfill scalar reflect
Fixed: tint:1018 Change-Id: I60916d6c4ac4ae8c1a88763c12acf83d19bb2e68 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/58821 Commit-Queue: David Neto <dneto@google.com> Auto-Submit: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
@@ -21,7 +21,9 @@ void main_1() {
|
||||
m24 = float2x2(float2(x_40, x_42), float2((x_44 * 1.0f), x_47));
|
||||
a = m24[0u].x;
|
||||
v2 = float2(asfloat(0x7fc00000u), 1.0f);
|
||||
v3 = reflect(v2, float2(a, 1.0f));
|
||||
const float2 x_53 = v2;
|
||||
const float2 x_55 = float2(a, 1.0f);
|
||||
v3 = reflect(x_53, x_55);
|
||||
const uint scalar_offset_3 = ((16u * uint(0))) / 4;
|
||||
const float x_58 = asfloat(x_6[scalar_offset_3 / 4][scalar_offset_3 % 4]);
|
||||
const float2 x_59 = v3;
|
||||
|
||||
@@ -36,7 +36,8 @@ void main_1(constant buf0& x_6, constant buf1& x_8, thread float4* const tint_sy
|
||||
v2 = float2(NAN, 1.0f);
|
||||
float2 const x_53 = v2;
|
||||
float const x_54 = a;
|
||||
v3 = reflect(x_53, float2(x_54, 1.0f));
|
||||
float2 const x_55 = float2(x_54, 1.0f);
|
||||
v3 = reflect(x_53, x_55);
|
||||
float const x_58 = x_6.x_GLF_uniform_float_values.arr[0].el;
|
||||
float2 const x_59 = v3;
|
||||
float const x_61 = x_6.x_GLF_uniform_float_values.arr[0].el;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
; Bound: 98
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
%58 = OpExtInstImport "GLSL.std.450"
|
||||
%59 = OpExtInstImport "GLSL.std.450"
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
@@ -104,9 +104,9 @@
|
||||
OpStore %v2 %54
|
||||
%55 = OpLoad %v2float %v2
|
||||
%56 = OpLoad %float %a
|
||||
%59 = OpCompositeConstruct %v2float %56 %float_1
|
||||
%57 = OpExtInst %v2float %58 Reflect %55 %59
|
||||
OpStore %v3 %57
|
||||
%57 = OpCompositeConstruct %v2float %56 %float_1
|
||||
%58 = OpExtInst %v2float %59 Reflect %55 %57
|
||||
OpStore %v3 %58
|
||||
%60 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
|
||||
%61 = OpLoad %float %60
|
||||
%62 = OpLoad %v2float %v3
|
||||
|
||||
@@ -31,7 +31,8 @@ fn main_1() {
|
||||
v2 = vec2<f32>(-0x1.8p+128, 1.0);
|
||||
let x_53 : vec2<f32> = v2;
|
||||
let x_54 : f32 = a;
|
||||
v3 = reflect(x_53, vec2<f32>(x_54, 1.0));
|
||||
let x_55 : vec2<f32> = vec2<f32>(x_54, 1.0);
|
||||
v3 = reflect(x_53, x_55);
|
||||
let x_58 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
let x_59 : vec2<f32> = v3;
|
||||
let x_61 : f32 = x_6.x_GLF_uniform_float_values[0];
|
||||
|
||||
Reference in New Issue
Block a user