glsl: add xfb helpers and fields to the tfeedback_decl class

We also apply any array/struct offsets.

Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Timothy Arceri
2016-02-24 16:37:02 +11:00
parent 0822517936
commit 4305a60173
2 changed files with 30 additions and 2 deletions

View File

@@ -122,6 +122,16 @@ public:
return this->stream_id;
}
unsigned get_buffer() const
{
return this->buffer;
}
unsigned get_offset() const
{
return this->offset;
}
/**
* The total number of varying components taken up by this variable. Only
* valid if assign_location() has been called.
@@ -201,6 +211,16 @@ private:
*/
int location;
/**
* Used to store the buffer assigned by xfb_buffer.
*/
unsigned buffer;
/**
* Used to store the offset assigned by xfb_offset.
*/
unsigned offset;
/**
* If non-zero, then this variable may be packed along with other variables
* into a single varying slot, so this offset should be applied when