X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fetnaviv%2Fetnaviv_context.h;h=81d4d963e058865f7c88e7b61b408be049760845;hb=a5e7c12cedb8a91236dd3caf99133f86349702a9;hp=9e00d34d23a2f822ba4835ab5c088a768a2b4a95;hpb=7d2a80626633b08a347aa11f85f4d96585958e6a;p=mesa.git diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.h b/src/gallium/drivers/etnaviv/etnaviv_context.h index 9e00d34d23a..81d4d963e05 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.h +++ b/src/gallium/drivers/etnaviv/etnaviv_context.h @@ -42,9 +42,9 @@ struct pipe_screen; struct etna_shader_variant; +struct etna_sampler_ts; struct etna_index_buffer { - struct pipe_index_buffer ib; struct etna_reloc FE_INDEX_STREAM_BASE_ADDR; uint32_t FE_INDEX_STREAM_CONTROL; uint32_t FE_PRIMITIVE_RESTART_INDEX; @@ -70,6 +70,7 @@ struct etna_transfer { struct pipe_transfer base; struct pipe_resource *rsc; void *staging; + void *mapped; }; struct etna_vertexbuf_state { @@ -87,20 +88,27 @@ struct etna_shader_state { enum etna_immediate_contents { ETNA_IMMEDIATE_UNUSED = 0, ETNA_IMMEDIATE_CONSTANT, + ETNA_IMMEDIATE_UNIFORM, ETNA_IMMEDIATE_TEXRECT_SCALE_X, ETNA_IMMEDIATE_TEXRECT_SCALE_Y, + ETNA_IMMEDIATE_UBO0_ADDR, + ETNA_IMMEDIATE_UBOMAX_ADDR = ETNA_IMMEDIATE_UBO0_ADDR + 255, }; struct etna_shader_uniform_info { enum etna_immediate_contents *imm_contents; uint32_t *imm_data; uint32_t imm_count; - uint32_t const_count; }; struct etna_context { struct pipe_context base; + /* GPU-specific implementation to emit texture state */ + void (*emit_texture_state)(struct etna_context *pctx); + /* Get sampler TS pointer for sampler view */ + struct etna_sampler_ts *(*ts_for_sampler_view)(struct pipe_sampler_view *pview); + struct etna_specs specs; struct etna_screen *screen; struct etna_cmd_stream *stream; @@ -125,14 +133,12 @@ struct etna_context { ETNA_DIRTY_SHADER = (1 << 16), ETNA_DIRTY_TS = (1 << 17), ETNA_DIRTY_TEXTURE_CACHES = (1 << 18), + ETNA_DIRTY_DERIVE_TS = (1 << 19), } dirty; uint32_t prim_hwsupport; struct primconvert_context *primconvert; - /* list of resources used by currently-unsubmitted renders */ - struct list_head used_resources; - struct slab_child_pool transfer_pool; struct blitter_context *blitter; @@ -156,6 +162,7 @@ struct etna_context { struct compiled_viewport_state viewport; unsigned num_fragment_sampler_views; uint32_t active_sampler_views; + uint32_t dirty_sampler_views; struct pipe_sampler_view *sampler_view[PIPE_MAX_SAMPLERS]; struct pipe_constant_buffer constant_buffer[PIPE_SHADER_TYPES]; struct etna_vertexbuf_state vertex_buffer; @@ -168,16 +175,21 @@ struct etna_context { struct pipe_viewport_state viewport_s; struct pipe_scissor_state scissor_s; - /* cached state of entire GPU */ - struct etna_3d_state gpu3d; - /* stats/counters */ struct { uint64_t prims_emitted; uint64_t draw_calls; + uint64_t rs_operations; } stats; struct pipe_debug_callback debug; + int in_fence_fd; + + /* list of active hardware queries */ + struct list_head active_hw_queries; + + struct etna_bo *dummy_rt; + struct etna_reloc dummy_rt_reloc; }; static inline struct etna_context *