adding OpFMul
This commit is contained in:
@@ -9,7 +9,9 @@ struct FragOut
|
||||
[entry(frag)]
|
||||
fn main() -> FragOut
|
||||
{
|
||||
let ratio = vec4[f32](2.0, 2.0, 8.0, 0.25);
|
||||
|
||||
let output: FragOut;
|
||||
output.color = vec4[f32](4.0, 3.0, 2.0, 1.0);
|
||||
output.color = vec4[f32](4.0, 3.0, 2.0, 1.0) * ratio;
|
||||
return output;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.0
|
||||
; Generator: SirLynix Nazara ShaderLang Compiler; 4226
|
||||
; Bound: 23
|
||||
; Bound: 29
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -21,23 +21,30 @@
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%FragOut = OpTypeStruct %v4float
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_8 = OpConstant %float 8
|
||||
%float_0_25 = OpConstant %float 0.25
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%_ptr_Function_FragOut = OpTypePointer Function %FragOut
|
||||
%int = OpTypeInt 32 1
|
||||
%int_0 = OpConstant %int 0
|
||||
%float_4 = OpConstant %float 4
|
||||
%float_3 = OpConstant %float 3
|
||||
%float_2 = OpConstant %float 2
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Function_v4float = OpTypePointer Function %v4float
|
||||
%color = OpVariable %_ptr_Output_v4float Output
|
||||
%main = OpFunction %void None %2
|
||||
%16 = OpLabel
|
||||
%17 = OpVariable %_ptr_Function_FragOut Function
|
||||
%18 = OpCompositeConstruct %v4float %float_4 %float_3 %float_2 %float_1
|
||||
%19 = OpAccessChain %_ptr_Function_v4float %17 %int_0
|
||||
OpStore %19 %18
|
||||
%21 = OpLoad %FragOut %17
|
||||
%22 = OpCompositeExtract %v4float %21 0
|
||||
OpStore %color %22
|
||||
%19 = OpLabel
|
||||
%20 = OpVariable %_ptr_Function_v4float Function
|
||||
%21 = OpVariable %_ptr_Function_FragOut Function
|
||||
%22 = OpCompositeConstruct %v4float %float_2 %float_2 %float_8 %float_0_25
|
||||
OpStore %20 %22
|
||||
%23 = OpCompositeConstruct %v4float %float_4 %float_3 %float_2 %float_1
|
||||
%24 = OpLoad %v4float %20
|
||||
%25 = OpFMul %v4float %23 %24
|
||||
%26 = OpAccessChain %_ptr_Function_v4float %21 %int_0
|
||||
OpStore %26 %25
|
||||
%27 = OpLoad %FragOut %21
|
||||
%28 = OpCompositeExtract %v4float %27 0
|
||||
OpStore %color %28
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user