SPV: Implement specialization constants for ?:.
This commit is contained in:
parent
433e9ff896
commit
8e6c6cef6a
5 changed files with 73 additions and 12 deletions
|
|
@ -110,5 +110,15 @@ int non_const_array_size_from_spec_const() {
|
|||
return array[sp_int + 1];
|
||||
}
|
||||
|
||||
void main() {}
|
||||
// ternary
|
||||
layout(constant_id = 210) const int a = 4;
|
||||
layout(constant_id = 211) const int b = 6;
|
||||
layout(constant_id = 212) const bool c = true;
|
||||
int ternayArray1[a > b ? a : b];
|
||||
const int t1 = c ? 13 : 17;
|
||||
const int t2 = c ? a : 17;
|
||||
const int t3 = true ? a : 17;
|
||||
const int t4 = a > b ? 13 + a : 17 * b;
|
||||
const vec2 v2 = !c ? vec2(1.0) : vec2(2.0);
|
||||
|
||||
void main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue