Merge from petecoup/shortvec-in-struct branch.
Fixes issue #49: using short vector types in struct declarations would give a bogus parse error.
This commit is contained in:
committed by
Matt Pharr
parent
5cc750ecee
commit
126e065601
15
tests/struct-test-124.ispc
Normal file
15
tests/struct-test-124.ispc
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
export void f_v(uniform float RET[]) {
|
||||
varying struct { float<2> v; } a;
|
||||
a.v.x = 1;
|
||||
a.v.y = 2;
|
||||
RET[programIndex] = a.v.x + a.v.y;
|
||||
}
|
||||
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 3;
|
||||
}
|
||||
15
tests/struct-test-125.ispc
Normal file
15
tests/struct-test-125.ispc
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
export uniform int width() { return programCount; }
|
||||
|
||||
|
||||
export void f_v(uniform float RET[]) {
|
||||
varying struct { float<2> v; } a;
|
||||
a.v[0] = 1;
|
||||
a.v[1] = 2;
|
||||
RET[programIndex] = a.v[0] + a.v[1];
|
||||
}
|
||||
|
||||
|
||||
export void result(uniform float RET[]) {
|
||||
RET[programIndex] = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user