#include "lp_rast.h"
#include "lp_state_fs.h"
#include "lp_state_setup.h"
+#include "lp_context.h"
#define NUM_CHANNELS 4
int i;
int nr_planes = 4;
unsigned scissor_index = 0;
+ unsigned layer = 0;
/* linewidth should be interpreted as integer */
int fixed_width = util_iround(width) * FIXED_ONE;
nr_planes = 8;
if (setup->viewport_index_slot > 0) {
unsigned *udata = (unsigned*)v1[setup->viewport_index_slot];
- scissor_index = *udata;
+ scissor_index = lp_clamp_scissor_idx(*udata);
}
}
else {
nr_planes = 4;
}
+ if (setup->layer_slot > 0) {
+ layer = *(unsigned*)v1[setup->layer_slot];
+ layer = MIN2(layer, scene->fb_max_layer);
+ }
dx = v1[0][0] - v2[0][0];
dy = v1[0][1] - v2[0][1];
y[3] = subpixel_snap(v1[0][1] + y_offset - setup->pixel_offset);
}
-
-
- LP_COUNT(nr_tris);
-
-
/* Bounding rectangle (in pixels) */
{
/* Yes this is necessary to accurately calculate bounding boxes
line->v[1][1] = v2[0][1];
#endif
+ LP_COUNT(nr_tris);
+
+ if (setup->active_query[PIPE_QUERY_PIPELINE_STATISTICS]) {
+ struct llvmpipe_context *lp_context = (struct llvmpipe_context *)setup->pipe;
+ lp_context->pipeline_statistics.c_primitives++;
+ }
+
/* calculate the deltas */
plane = GET_PLANES(line);
plane[0].dcdy = x[0] - x[1];
line->inputs.frontfacing = TRUE;
line->inputs.disable = FALSE;
line->inputs.opaque = FALSE;
+ line->inputs.layer = layer;
for (i = 0; i < 4; i++) {