#define LP_SETUP_NEW_BLEND_COLOR 0x04
#define LP_SETUP_NEW_SCISSOR 0x08
#define LP_SETUP_NEW_VIEWPORTS 0x10
-
+#define LP_SETUP_NEW_SSBOS 0x20
+#define LP_SETUP_NEW_IMAGES 0x40
struct lp_setup_variant;
float pixel_offset;
float line_width;
float point_size;
- uint8_t psize_slot;
- uint8_t viewport_index_slot;
- uint8_t layer_slot;
- uint8_t face_slot;
+ int8_t psize_slot;
+ int8_t viewport_index_slot;
+ int8_t layer_slot;
+ int8_t face_slot;
struct pipe_framebuffer_state fb;
struct u_rect framebuffer;
const struct lp_rast_state *stored; /**< what's in the scene */
struct lp_rast_state current; /**< currently set state */
struct pipe_resource *current_tex[PIPE_MAX_SHADER_SAMPLER_VIEWS];
+ unsigned current_tex_num;
} fs;
/** fragment shader constants */
const void *stored_data;
} constants[LP_MAX_TGSI_CONST_BUFFERS];
+ /** fragment shader buffers */
+ struct {
+ struct pipe_shader_buffer current;
+ } ssbos[LP_MAX_TGSI_SHADER_BUFFERS];
+
+ struct {
+ struct pipe_image_view current;
+ } images[LP_MAX_TGSI_SHADER_IMAGES];
+
struct {
struct pipe_blend_color current;
uint8_t *stored;
const float (*v2)[4]);
};
+static inline void
+scissor_planes_needed(boolean scis_planes[4], const struct u_rect *bbox,
+ const struct u_rect *scissor)
+{
+ /* left */
+ scis_planes[0] = (bbox->x0 < scissor->x0);
+ /* right */
+ scis_planes[1] = (bbox->x1 > scissor->x1);
+ /* top */
+ scis_planes[2] = (bbox->y0 < scissor->y0);
+ /* bottom */
+ scis_planes[3] = (bbox->y1 > scissor->y1);
+}
+
+
void lp_setup_choose_triangle( struct lp_setup_context *setup );
void lp_setup_choose_line( struct lp_setup_context *setup );
void lp_setup_choose_point( struct lp_setup_context *setup );
unsigned *tri_size);
boolean
-lp_setup_bin_triangle( struct lp_setup_context *setup,
- struct lp_rast_triangle *tri,
- const struct u_rect *bbox,
- int nr_planes,
- unsigned scissor_index );
+lp_setup_bin_triangle(struct lp_setup_context *setup,
+ struct lp_rast_triangle *tri,
+ const struct u_rect *bboxorig,
+ const struct u_rect *bbox,
+ int nr_planes,
+ unsigned scissor_index);
#endif