c.func.single_program_flow = 1;
c.key = *key;
- brw_compute_vue_map(&c.vue_map, intel, c.key.nr_userclip,
- c.key.do_twoside_color, c.key.attrs);
+ brw_compute_vue_map(&c.vue_map, intel, c.key.nr_userclip, c.key.attrs);
/* nr_regs is the number of registers filled by reading data from the VUE.
* This program accesses the entire VUE, so nr_regs needs to be the size of
/* _NEW_LIGHT */
key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT);
key.pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
- key.do_twoside_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
/* _NEW_TRANSFORM */
key.nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
GLuint copy_bfc_cw:1;
GLuint copy_bfc_ccw:1;
GLuint clip_mode:3;
- GLuint do_twoside_color:1;
- GLuint pad0:10;
+ GLuint pad0:11;
GLfloat offset_factor;
GLfloat offset_units;
/* brw_vs.c */
void brw_compute_vue_map(struct brw_vue_map *vue_map,
const struct intel_context *intel, int nr_userclip,
- bool two_side_color, GLbitfield64 outputs_written);
+ GLbitfield64 outputs_written);
/*======================================================================
* Inline conversion functions. These are better-typed than the
c.key = *key;
/* The geometry shader needs to access the entire VUE. */
struct brw_vue_map vue_map;
- brw_compute_vue_map(&vue_map, intel, c.key.nr_userclip,
- c.key.do_twoside_color, c.key.attrs);
+ brw_compute_vue_map(&vue_map, intel, c.key.nr_userclip, c.key.attrs);
c.nr_regs = (vue_map.num_slots + 1)/2;
mem_ctx = NULL;
/* _NEW_LIGHT */
key->pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
- key->do_twoside_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
if (key->primitive == GL_QUADS && ctx->Light.ShadeModel != GL_FLAT) {
/* Provide consistent primitive order with brw_set_prim's
* optimization of single quads to trifans.
GLuint pv_first:1;
GLuint need_gs_prog:1;
GLuint nr_userclip:4;
- GLuint do_twoside_color:1;
- GLuint pad:21;
+ GLuint pad:22;
};
struct brw_gs_compile {
brw_init_compile(brw, &c.func, mem_ctx);
c.key = *key;
- brw_compute_vue_map(&c.vue_map, intel, c.key.nr_userclip,
- c.key.do_twoside_color, c.key.attrs);
+ brw_compute_vue_map(&c.vue_map, intel, c.key.nr_userclip, c.key.attrs);
c.urb_entry_read_offset = brw_sf_compute_urb_entry_read_offset(intel);
c.nr_attr_regs = (c.vue_map.num_slots + 1)/2 - c.urb_entry_read_offset;
c.nr_setup_regs = c.nr_attr_regs;
/* FINISHME: edgeflag */
brw_compute_vue_map(&c->vue_map, intel, c->key.nr_userclip,
- c->key.two_side_color, c->prog_data.outputs_written);
+ c->prog_data.outputs_written);
/* First mrf is the g0-based message header containing URB handles and such,
* which is implied in VS_OPCODE_URB_WRITE.
void
brw_compute_vue_map(struct brw_vue_map *vue_map,
const struct intel_context *intel, int nr_userclip,
- bool two_side_color, GLbitfield64 outputs_written)
+ GLbitfield64 outputs_written)
{
int i;
key.nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
key.copy_edgeflag = (ctx->Polygon.FrontMode != GL_FILL ||
ctx->Polygon.BackMode != GL_FILL);
- key.two_side_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
/* _NEW_LIGHT | _NEW_BUFFERS */
key.clamp_vertex_color = ctx->Light._ClampVertexColor;
GLuint nr_userclip:4;
GLuint copy_edgeflag:1;
GLuint point_coord_replace:8;
- GLuint two_side_color: 1;
GLuint clamp_vertex_color:1;
};
/* Allocate outputs. The non-position outputs go straight into message regs.
*/
brw_compute_vue_map(&c->vue_map, intel, c->key.nr_userclip,
- c->key.two_side_color, c->prog_data.outputs_written);
+ c->prog_data.outputs_written);
c->first_output = reg;
first_reladdr_output = get_first_reladdr_output(&c->vp->program);
urb_entry_read_offset = 1;
nr_userclip = brw_count_bits(ctx->Transform.ClipPlanesEnabled);
- brw_compute_vue_map(&vue_map, intel, nr_userclip, two_side_color,
- vs_outputs_written);
+ brw_compute_vue_map(&vue_map, intel, nr_userclip, vs_outputs_written);
urb_entry_read_length = (vue_map.num_slots + 1)/2 - urb_entry_read_offset;
if (urb_entry_read_length == 0) {
/* Setting the URB entry read length to 0 causes undefined behavior, so
int two_side_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
uint16_t attr_overrides[FRAG_ATTRIB_MAX];
- brw_compute_vue_map(&vue_map, intel, nr_userclip, two_side_color,
- vs_outputs_written);
+ brw_compute_vue_map(&vue_map, intel, nr_userclip, vs_outputs_written);
urb_entry_read_length = (vue_map.num_slots + 1)/2 - urb_entry_read_offset;
if (urb_entry_read_length == 0) {
/* Setting the URB entry read length to 0 causes undefined behavior, so