#include "lp_perf.h"
#include "lp_rast.h"
#include "lp_state_fs.h"
+#include "lp_state_setup.h"
#include "tgsi/tgsi_scan.h"
#define NUM_CHANNELS 4
setup_point_coefficients( struct lp_setup_context *setup,
struct point_info *info)
{
+ const struct lp_setup_variant_key *key = &setup->setup.variant->key;
const struct lp_fragment_shader *shader = setup->fs.current.variant->shader;
unsigned fragcoord_usage_mask = TGSI_WRITEMASK_XYZ;
unsigned slot;
/* setup interpolation for all the remaining attributes:
*/
- for (slot = 0; slot < setup->fs.nr_inputs; slot++) {
- enum lp_interp interp = setup->fs.input[slot].interp;
+ for (slot = 0; slot < key->num_inputs; slot++) {
+ unsigned vert_attr = key->inputs[slot].src_index;
+ unsigned usage_mask = key->inputs[slot].usage_mask;
+ enum lp_interp interp = key->inputs[slot].interp;
boolean perspective = !!(interp == LP_INTERP_PERSPECTIVE);
- unsigned vert_attr = setup->fs.input[slot].src_index;
- unsigned usage_mask = setup->fs.input[slot].usage_mask;
unsigned i;
if (perspective & usage_mask) {
const float (*v0)[4] )
{
/* x/y positions in fixed point */
+ const struct lp_setup_variant_key *key = &setup->setup.variant->key;
const int sizeAttr = setup->psize;
const float size
= (setup->point_size_per_vertex && sizeAttr > 0) ? v0[sizeAttr][0]
u_rect_find_intersection(&setup->draw_region, &bbox);
point = lp_setup_alloc_triangle(scene,
- setup->fs.nr_inputs,
+ key->num_inputs,
nr_planes,
&bytes);
if (!point)
plane[0].dcdx = -1;
plane[0].dcdy = 0;
plane[0].c = 1-bbox.x0;
- plane[0].ei = 0;
plane[0].eo = 1;
plane[1].dcdx = 1;
plane[1].dcdy = 0;
plane[1].c = bbox.x1+1;
- plane[1].ei = -1;
plane[1].eo = 0;
plane[2].dcdx = 0;
plane[2].dcdy = 1;
plane[2].c = 1-bbox.y0;
- plane[2].ei = 0;
plane[2].eo = 1;
plane[3].dcdx = 0;
plane[3].dcdy = -1;
plane[3].c = bbox.y1+1;
- plane[3].ei = -1;
plane[3].eo = 0;
}