Implement 'index' layout qualifier for fragment outputs. Based partly on a submission.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27759 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
d1888f83f6
commit
aa657c117e
18 changed files with 135 additions and 58 deletions
|
|
@ -77,18 +77,20 @@ struct TRange {
|
|||
int last;
|
||||
};
|
||||
|
||||
// A *location* range is a 2-D rectangle; the set of (location, component) pairs all lying
|
||||
// both within the location range and the component range. Locations don't alias unless
|
||||
// both dimensions of their range overlap.
|
||||
// An IO range is a 3-D rectangle; the set of (location, component, index) triples all lying
|
||||
// within the same location range, component range, and index value. Locations don't alias unless
|
||||
// all other dimensions of their range overlap.
|
||||
struct TIoRange {
|
||||
TIoRange(TRange location, TRange component, TBasicType basicType) : location(location), component(component), basicType(basicType) { }
|
||||
TIoRange(TRange location, TRange component, TBasicType basicType, int index)
|
||||
: location(location), component(component), basicType(basicType), index(index) { }
|
||||
bool overlap(const TIoRange& rhs) const
|
||||
{
|
||||
return location.overlap(rhs.location) && component.overlap(rhs.component);
|
||||
return location.overlap(rhs.location) && component.overlap(rhs.component) && index == rhs.index;
|
||||
}
|
||||
TRange location;
|
||||
TRange component;
|
||||
TBasicType basicType;
|
||||
int index;
|
||||
};
|
||||
|
||||
// Things that need to be tracked per xfb buffer.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue