* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
- uint attrib_front0, attrib_back0;
- uint attrib_front1, attrib_back1;
+ int attrib_front0, attrib_back0;
+ int attrib_front1, attrib_back1;
copy_bfc( struct twoside_stage *twoside,
const struct vertex_header *v,
unsigned idx )
{
struct vertex_header *tmp = dup_vert( &twoside->stage, v, idx );
copy_bfc( struct twoside_stage *twoside,
const struct vertex_header *v,
unsigned idx )
{
struct vertex_header *tmp = dup_vert( &twoside->stage, v, idx );
COPY_4FV(tmp->data[twoside->attrib_front0],
tmp->data[twoside->attrib_back0]);
}
COPY_4FV(tmp->data[twoside->attrib_front0],
tmp->data[twoside->attrib_back0]);
}
COPY_4FV(tmp->data[twoside->attrib_front1],
tmp->data[twoside->attrib_back1]);
}
COPY_4FV(tmp->data[twoside->attrib_front1],
tmp->data[twoside->attrib_back1]);
}
- twoside->attrib_front0 = 0;
- twoside->attrib_front1 = 0;
- twoside->attrib_back0 = 0;
- twoside->attrib_back1 = 0;
+ twoside->attrib_front0 = -1;
+ twoside->attrib_front1 = -1;
+ twoside->attrib_back0 = -1;
+ twoside->attrib_back1 = -1;
/* Find which vertex shader outputs are front/back colors */
for (i = 0; i < vs->info.num_outputs; i++) {
/* Find which vertex shader outputs are front/back colors */
for (i = 0; i < vs->info.num_outputs; i++) {
/*
* We'll multiply the primitive's determinant by this sign to determine
* if the triangle is back-facing (negative).
/*
* We'll multiply the primitive's determinant by this sign to determine
* if the triangle is back-facing (negative).
struct draw_stage *draw_twoside_stage( struct draw_context *draw )
{
struct twoside_stage *twoside = CALLOC_STRUCT(twoside_stage);
struct draw_stage *draw_twoside_stage( struct draw_context *draw )
{
struct twoside_stage *twoside = CALLOC_STRUCT(twoside_stage);