KalebDark / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Ternary operator should be disallowed on arrays and structs #976

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile the following shader:
#version 300 es
precision mediump float;

void main() {
    float[] a = float[](0.0, 1.0);
    float[] b = float[](0.0, 2.0);
    float[] c = true ? b : a;
}

What is the expected output? What do you see instead?
Expected: compilation fails
Actual: compilation succeeds

ESSL3.00 section 5.7 says that the ternary operator is not one of the operators 
that can operate on whole arrays/structs. ANGLE should check this.

Original issue reported on code.google.com by oetu...@nvidia.com on 15 Apr 2015 at 1:09

GoogleCodeExporter commented 9 years ago

Original comment by oetu...@nvidia.com on 24 Apr 2015 at 8:55