mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
i965: For GEN6+, always make front/back colors adjacent in VUE.
When doing two-sided color on GEN6+, we use the SF unit's INPUTATTR_FACING mode to cause front colors to be used on front-facing triangles, and back colors to be used on back-facing triangles. This mode requires that the front and back colors be adjacent in the VUE. Previously, we would only place front and back colors adjacent in the VUE when two-sided color was enabled. Now we place them adjacent in the VUE whether two-sided color is enabled or not. (We still only swizzle the colors when two-sided color is enabled, so there should be no user-visible change). This simplifies the implementation of the VUE map and reduces the amount of code that is dependent on two-sided color mode. Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
18dcda2dcf
commit
f2b09257ba
1 changed files with 12 additions and 16 deletions
|
|
@ -116,22 +116,18 @@ brw_compute_vue_map(struct brw_vue_map *vue_map,
|
|||
assign_vue_slot(vue_map, BRW_VERT_RESULT_CLIP0);
|
||||
assign_vue_slot(vue_map, BRW_VERT_RESULT_CLIP1);
|
||||
}
|
||||
if (two_side_color) {
|
||||
/* front and back colors need to be consecutive */
|
||||
if ((outputs_written & BITFIELD64_BIT(VERT_RESULT_COL1)) &&
|
||||
(outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC1))) {
|
||||
assert(outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0));
|
||||
assert(outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0));
|
||||
assign_vue_slot(vue_map, VERT_RESULT_COL0);
|
||||
assign_vue_slot(vue_map, VERT_RESULT_BFC0);
|
||||
assign_vue_slot(vue_map, VERT_RESULT_COL1);
|
||||
assign_vue_slot(vue_map, VERT_RESULT_BFC1);
|
||||
} else if ((outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0)) &&
|
||||
(outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0))) {
|
||||
assign_vue_slot(vue_map, VERT_RESULT_COL0);
|
||||
assign_vue_slot(vue_map, VERT_RESULT_BFC0);
|
||||
}
|
||||
}
|
||||
/* front and back colors need to be consecutive so that we can use
|
||||
* ATTRIBUTE_SWIZZLE_INPUTATTR_FACING to swizzle them when doing
|
||||
* two-sided color.
|
||||
*/
|
||||
if (outputs_written & BITFIELD64_BIT(VERT_RESULT_COL0))
|
||||
assign_vue_slot(vue_map, VERT_RESULT_COL0);
|
||||
if (outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC0))
|
||||
assign_vue_slot(vue_map, VERT_RESULT_BFC0);
|
||||
if (outputs_written & BITFIELD64_BIT(VERT_RESULT_COL1))
|
||||
assign_vue_slot(vue_map, VERT_RESULT_COL1);
|
||||
if (outputs_written & BITFIELD64_BIT(VERT_RESULT_BFC1))
|
||||
assign_vue_slot(vue_map, VERT_RESULT_BFC1);
|
||||
break;
|
||||
default:
|
||||
assert (!"VUE map not known for this chip generation");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue