lima/parser: Fix VS cmd stream parser
[mesa.git] / src / gallium / drivers / lima / lima_context.h
index 4bbe915bcdc1defd6170c4a34aea0af8299a7603..b2fa8d1d483e30689d202b555515cafda43fa9a7 100644 (file)
@@ -81,7 +81,10 @@ struct lima_vs_shader_state {
 
    struct lima_varying_info varying[LIMA_MAX_VARYING_NUM];
    int varying_stride;
-   int num_varying;
+   int num_outputs;
+   int num_varyings;
+   int gl_pos_idx;
+   int point_size_idx;
 
    struct lima_bo *bo;
 };
@@ -107,7 +110,7 @@ struct lima_context_vertex_buffer {
 
 struct lima_context_viewport_state {
    struct pipe_viewport_state transform;
-   float x, y, width, height;
+   float left, right, bottom, top;
    float near, far;
 };
 
@@ -118,8 +121,6 @@ struct lima_context_constant_buffer {
 };
 
 enum lima_ctx_buff {
-   lima_ctx_buff_sh_varying,
-   lima_ctx_buff_sh_gl_pos,
    lima_ctx_buff_gp_varying_info,
    lima_ctx_buff_gp_attribute_info,
    lima_ctx_buff_gp_uniform,
@@ -129,6 +130,7 @@ enum lima_ctx_buff {
    lima_ctx_buff_pp_uniform_array,
    lima_ctx_buff_pp_uniform,
    lima_ctx_buff_pp_tex_desc,
+   lima_ctx_buff_pp_stack,
    lima_ctx_buff_num,
 };
 
@@ -158,12 +160,6 @@ struct lima_ctx_plb_pp_stream {
    uint32_t offset[4];
 };
 
-struct lima_damage_state {
-   struct pipe_scissor_state *region;
-   unsigned num_region;
-   bool aligned;
-};
-
 struct lima_pp_stream_state {
    struct lima_bo *bo;
    uint32_t bo_offset;
@@ -192,7 +188,6 @@ struct lima_context {
    } dirty;
 
    struct u_upload_mgr *uploader;
-   struct u_suballocator *suballocator;
    struct blitter_context *blitter;
 
    struct slab_child_pool transfer_pool;
@@ -212,7 +207,6 @@ struct lima_context {
    struct pipe_stencil_ref stencil_ref;
    struct lima_context_constant_buffer const_buffer[PIPE_SHADER_TYPES];
    struct lima_texture_stateobj tex_stateobj;
-   struct lima_damage_state damage;
    struct lima_pp_stream_state pp_stream;
 
    unsigned min_index;
@@ -222,7 +216,6 @@ struct lima_context {
    #define LIMA_CTX_PLB_MAX_NUM  4
    #define LIMA_CTX_PLB_DEF_NUM  2
    #define LIMA_CTX_PLB_BLK_SIZE 512
-   unsigned plb_max_blk;
    unsigned plb_size;
    unsigned plb_gp_size;
 
@@ -230,6 +223,9 @@ struct lima_context {
    struct lima_bo *gp_tile_heap[LIMA_CTX_PLB_MAX_NUM];
    #define gp_tile_heap_size         0x100000
    struct lima_bo *plb_gp_stream;
+   struct lima_bo *gp_output;
+   uint32_t gp_output_varyings_offt;
+   uint32_t gp_output_point_size_offt;
 
    struct hash_table *plb_pp_stream;
    uint32_t plb_index;
@@ -243,6 +239,13 @@ struct lima_context {
    struct lima_submit *pp_submit;
 
    int id;
+
+   struct pipe_debug_callback debug;
+
+   int pp_max_stack_size;
+
+   unsigned index_offset;
+   struct lima_resource *index_res;
 };
 
 static inline struct lima_context *
@@ -278,7 +281,7 @@ uint32_t lima_ctx_buff_va(struct lima_context *ctx, enum lima_ctx_buff buff,
                           unsigned submit);
 void *lima_ctx_buff_map(struct lima_context *ctx, enum lima_ctx_buff buff);
 void *lima_ctx_buff_alloc(struct lima_context *ctx, enum lima_ctx_buff buff,
-                          unsigned size, bool uploader);
+                          unsigned size);
 
 void lima_state_init(struct lima_context *ctx);
 void lima_state_fini(struct lima_context *ctx);