summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_point_sprite.c
Commit message (Collapse)AuthorAgeFilesLines
* tgsi: fix mixed data type comparison in tgsi_point_sprite.cCharmaine Lee2016-06-061-3/+3
| | | | | | | | | | | | | | | | Cast the unsigned semantic index to integer datatype before comparing to max_generic, otherwise, max_generic which is initialized to -1 will be converted to unsigned int before the comparison, causing a wrong semantic index to be assigned to a shader output. Fixes the assert running TurboCAD_gl.trace. (VMware bug 1667265) Also tested with glretrace, mesa demos pointblast, spriteblast and pointcoord. v2: use the original max_generic variable but add the (int) cast to the semantic index, as suggested by Brian. Reviewed-by: Brian Paul <brianp@vmware.com>
* tgsi: adds tgsi utility to transform a shader to support point spriteCharmaine Lee2015-09-011-0/+582
This adds a tgsi utility tgsi_add_point_sprite to transform a geometry shader to emulate wide points by drawing quads. This utility adds an extra output for the original point position if the point position is to be written to a stream output buffer. It also assumes the driver will add a constant for inverse viewport scale after the user defined constants. Reviewed-by: Brian Paul <brianp@vmware.com>