X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_setup_context.h;h=1a147e0353dc15426fde320d30e57e9fdc0f13b3;hb=4418a493c2466e734e1ca5ace51535d1dbcf8a46;hp=4594f7597d5d7212ae604f43a8093646ac94b998;hpb=ff20543c815a14fddad1efaaef1610454a1924d4;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_setup_context.h b/src/gallium/drivers/llvmpipe/lp_setup_context.h index 4594f7597d5..1a147e0353d 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_context.h +++ b/src/gallium/drivers/llvmpipe/lp_setup_context.h @@ -41,6 +41,7 @@ #include "lp_scene.h" #include "draw/draw_vbuf.h" +#include "util/u_rect.h" #define LP_SETUP_NEW_FS 0x01 #define LP_SETUP_NEW_CONSTANTS 0x02 @@ -80,7 +81,7 @@ struct lp_setup_context * create/install this itself now. */ struct draw_stage *vbuf; - struct lp_rasterizer *rast; + unsigned num_threads; struct lp_scene *scenes[MAX_SCENES]; /**< all the scenes */ struct lp_scene *scene; /**< current scene being built */ struct lp_scene_queue *empty_scenes; /**< queue of empty scenes */ @@ -92,17 +93,21 @@ struct lp_setup_context float pixel_offset; struct pipe_framebuffer_state fb; + struct u_rect framebuffer; + struct u_rect scissor; + struct u_rect draw_region; /* intersection of fb & scissor */ struct { unsigned flags; union lp_rast_cmd_arg color; /**< lp_rast_clear_color() cmd */ - union lp_rast_cmd_arg zstencil; /**< lp_rast_clear_zstencil() cmd */ + struct lp_rast_clearzs clearzs; /**< lp_rast_clear_zstencil() cmd */ } clear; enum setup_state { - SETUP_FLUSHED, - SETUP_CLEARED, - SETUP_ACTIVE + SETUP_FLUSHED, /**< scene is null */ + SETUP_EMPTY, /**< scene exists but has only state changes */ + SETUP_CLEARED, /**< scene exists but has only clears */ + SETUP_ACTIVE /**< scene exists and has at least one draw/query */ } state; struct { @@ -126,10 +131,6 @@ struct lp_setup_context uint8_t *stored; } blend_color; - struct { - struct pipe_scissor_state current; - const void *stored; - } scissor; unsigned dirty; /**< bitmask of LP_SETUP_NEW_x bits */ @@ -158,4 +159,16 @@ void lp_setup_update_state( struct lp_setup_context *setup ); void lp_setup_destroy( struct lp_setup_context *setup ); +void +lp_setup_print_triangle(struct lp_setup_context *setup, + const float (*v0)[4], + const float (*v1)[4], + const float (*v2)[4]); + +void +lp_setup_print_vertex(struct lp_setup_context *setup, + const char *name, + const float (*v)[4]); + #endif +