diff options
author | Christoph Bumiller <[email protected]> | 2012-01-20 13:24:46 +0100 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2012-01-20 19:24:31 +0100 |
commit | d540af554adfe302387014c0f46d6ac3aaa75121 (patch) | |
tree | 1b470569cc1c0fefd7e14623f903eaf9e0850959 /src/mesa/main | |
parent | c96b9834032952492efbd2d1f5511fe225704918 (diff) |
mesa: allocate transform_feedback_info::Outputs array dynamically
The nvc0 gallium driver is advertising 128 MAX_INTERLEAVED_COMPS
which made it always assert in the linker when TFB was used since
the Outputs array was smaller than that maximum.
v2: added assertions
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/mtypes.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index f8ef01d4e0a..2ff6085966b 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1827,6 +1827,22 @@ struct gl_transform_feedback_varying_info { GLint Size; }; +struct gl_transform_feedback_output { + unsigned OutputRegister; + unsigned OutputBuffer; + unsigned NumComponents; + + /** offset (in DWORDs) of this output within the interleaved structure */ + unsigned DstOffset; + + /** + * Offset into the output register of the data to output. For example, + * if NumComponents is 2 and ComponentOffset is 1, then the data to + * offset is in the y and z components of the output register. + */ + unsigned ComponentOffset; +}; + /** Post-link transform feedback info. */ struct gl_transform_feedback_info { unsigned NumOutputs; @@ -1836,21 +1852,7 @@ struct gl_transform_feedback_info { */ unsigned NumBuffers; - struct { - unsigned OutputRegister; - unsigned OutputBuffer; - unsigned NumComponents; - - /** offset (in DWORDs) of this output within the interleaved structure */ - unsigned DstOffset; - - /** - * Offset into the output register of the data to output. For example, - * if NumComponents is 2 and ComponentOffset is 1, then the data to - * offset is in the y and z components of the output register. - */ - unsigned ComponentOffset; - } Outputs[MAX_PROGRAM_OUTPUTS]; + struct gl_transform_feedback_output *Outputs; /** Transform feedback varyings used for the linking of this shader program. * |