X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fetnaviv%2Fetnaviv_context.h;h=ea4de2e037236b5032135e59c49ecb9750e694fc;hp=1ed38ce48c1f6d3dbdd7fe43c8546ff6732a36c1;hb=d1925fec535bdadb28b9b25aa93be880fc79918f;hpb=9d1f8805b02bd15bc596de77f56837d83144689f diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.h b/src/gallium/drivers/etnaviv/etnaviv_context.h index 1ed38ce48c1..ea4de2e0372 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.h +++ b/src/gallium/drivers/etnaviv/etnaviv_context.h @@ -42,6 +42,7 @@ struct pipe_screen; struct etna_shader_variant; +struct etna_sampler_ts; struct etna_index_buffer { struct etna_reloc FE_INDEX_STREAM_BASE_ADDR; @@ -69,6 +70,7 @@ struct etna_transfer { struct pipe_transfer base; struct pipe_resource *rsc; void *staging; + void *mapped; }; struct etna_vertexbuf_state { @@ -86,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; @@ -130,9 +139,6 @@ struct etna_context { 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; @@ -169,9 +175,6 @@ 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; @@ -184,6 +187,19 @@ struct etna_context { /* list of active hardware queries */ struct list_head active_hw_queries; + + struct etna_bo *dummy_rt; + struct etna_reloc dummy_rt_reloc; + + /* Dummy texture descriptor (if needed) */ + struct etna_bo *dummy_desc_bo; + struct etna_reloc DUMMY_DESC_ADDR; + + /* set of resources used by currently-unsubmitted renders */ + struct set *used_resources_read; + struct set *used_resources_write; + + mtx_t lock; }; static inline struct etna_context *