Shader: Fix parsing of unary/dot/indices/and/or

This commit is contained in:
Jérôme Leclercq
2022-03-21 23:11:28 +01:00
parent 4fa3de519c
commit a54f70fd24
4 changed files with 173 additions and 93 deletions

View File

@@ -28,7 +28,7 @@ fn GetValue() -> f32
fn main() -> FragOut
{
let output: FragOut;
output.value = GetValue();
output.value = -GetValue();
return output;
}
@@ -49,7 +49,7 @@ layout(location = 0) out float _NzOut_value;
void main()
{
FragOut output_;
output_.value = GetValue();
output_.value = -GetValue();
_NzOut_value = output_.value;
return;
@@ -66,7 +66,7 @@ fn GetValue() -> f32
fn main() -> FragOut
{
let output: FragOut;
output.value = GetValue();
output.value = -GetValue();
return output;
}
)");
@@ -80,6 +80,7 @@ OpFunction
OpLabel
OpVariable
OpFunctionCall
OpFNegate
OpAccessChain
OpStore
OpLoad