mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
test for presence of both front and back color vertex slots
This commit is contained in:
parent
608914aeb0
commit
ff08c7b032
1 changed files with 7 additions and 4 deletions
|
|
@ -68,6 +68,9 @@ static INLINE void copy_attrib( unsigned attr_dst,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copy back color(s) to front color(s).
|
||||||
|
*/
|
||||||
static struct vertex_header *copy_bfc( struct twoside_stage *twoside,
|
static struct vertex_header *copy_bfc( struct twoside_stage *twoside,
|
||||||
const struct vertex_header *v,
|
const struct vertex_header *v,
|
||||||
unsigned idx )
|
unsigned idx )
|
||||||
|
|
@ -75,12 +78,12 @@ static struct vertex_header *copy_bfc( struct twoside_stage *twoside,
|
||||||
struct vertex_header *tmp = dup_vert( &twoside->stage, v, idx );
|
struct vertex_header *tmp = dup_vert( &twoside->stage, v, idx );
|
||||||
const struct draw_context *draw = twoside->stage.draw;
|
const struct draw_context *draw = twoside->stage.draw;
|
||||||
|
|
||||||
if (draw->attrib_front0 != -1) {
|
if (draw->attrib_front0 && draw->attrib_back0) {
|
||||||
assert(draw->attrib_back0 != -1);
|
assert(draw->attrib_back0);
|
||||||
copy_attrib(draw->attrib_front0, draw->attrib_back0, tmp);
|
copy_attrib(draw->attrib_front0, draw->attrib_back0, tmp);
|
||||||
}
|
}
|
||||||
if (draw->attrib_front1 != -1) {
|
if (draw->attrib_front1 && draw->attrib_back1) {
|
||||||
assert(draw->attrib_back1 != -1);
|
assert(draw->attrib_back1);
|
||||||
copy_attrib(draw->attrib_front1, draw->attrib_back1, tmp);
|
copy_attrib(draw->attrib_front1, draw->attrib_back1, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue