summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo
Commit message (Collapse)AuthorAgeFilesLines
* ilo: fix format of edge flag pointerChia-I Wu2014-09-301-3/+5
| | | | | | | The VE format of edge flag pointers was changed in 780ce576bb1781f027797039693b98253ee4813e. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: add a pass to finalize ilo_ve_stateChia-I Wu2014-09-308-158/+190
| | | | | | | | Add finalize_vertex_elements() to finalize ilo_ve_state. This fixes a potential issue with URB entry allocation for VS and move the complexity of gen6_3DSTATE_VERTEX_ELEMENTS() to the new function. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: precalculate aligned depth buffer sizeChia-I Wu2014-09-307-48/+43
| | | | | | To replace the hacky zs_align_surface(). Signed-off-by: Chia-I Wu <[email protected]>
* ilo: use dynamic bo for rectlist verticesChia-I Wu2014-09-3010-73/+92
| | | | | | The size is always 24 bytes. We can upload them to the dynamic buffer. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: fix a missing 'else'Chia-I Wu2014-09-291-1/+1
| | | | | | An 'else' is missing in the disassembler. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: give gen6_draw_session a better prefixChia-I Wu2014-09-266-74/+74
| | | | | | gen6_draw_session is not GEN dependent. Rename it to ilo_render_draw_session. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: make ilo_render opaqueChia-I Wu2014-09-267-94/+90
| | | | | | | It is not used outside the render code. There are also too many details in it that we do not want other components to access directly. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: make ilo_render_emit_draw() directChia-I Wu2014-09-268-295/+174
| | | | | | | Remove emit_draw() and ILO_RENDER_DRAW indirections. With all emit functions being direct now, ilo_render_estimate_size() and more can also be removed. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: make ilo_render_emit_rectlist() directChia-I Wu2014-09-266-53/+84
| | | | | | Remove emit_rectlist() and ILO_RENDER_RECTLIST indirections. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: clean up draw and rectlist state emissionChia-I Wu2014-09-266-812/+972
| | | | | | | | | | | | | | | | Add these new high-level functions ilo_render_get_draw_dynamic_states_len() ilo_render_emit_draw_dynamic_states() ilo_render_get_rectlist_dynamic_states_len() ilo_render_emit_rectlist_dynamic_states() ilo_render_get_draw_surface_states_len() ilo_render_emit_draw_surface_states() for draw and rectlist state emission. They are implemented in the new ilo_render_dynamic.c and ilo_render_surface.c. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: sanity check ilo_render_get_*_len()Chia-I Wu2014-09-261-5/+12
| | | | | | Assert that we never write more than what ilo_render_get_*_len() returns. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: simplify ilo_render_get_query_len()Chia-I Wu2014-09-261-25/+12
| | | | | | | For all supported query types, we always emit a PIPE_CONTROL. Call ilo_render_get_flush_len() for simplicity and clarity. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: make ilo_render_emit_query() directChia-I Wu2014-09-266-173/+159
| | | | | | Remove emit_query() and ILO_RENDER_QUERY indirections. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: make ilo_render_emit_flush() directChia-I Wu2014-09-266-54/+61
| | | | | | Remove emit_flush() and ILO_RENDER_FLUSH indirections. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: simplify ilo_render invalidationChia-I Wu2014-09-267-86/+83
| | | | | | | | | ilo_render is based on ilo_builder. We should only care if the builder buffers are invalidated, or if the hardware context is invalidated. Replace ilo_render_invalidate() with flags by ilo_render_invalidate_builder() and ilo_render_invalidate_hw(). Signed-off-by: Chia-I Wu <[email protected]>
* ilo: add ilo_builder_{dynamic,surface}_used()Chia-I Wu2014-09-261-0/+15
| | | | | | Return how many DWords are used in dynamic and surface buffers respectively. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: rename state buffer to dynamic bufferChia-I Wu2014-09-264-26/+26
| | | | | | | Both dynamic buffer and surface buffer are state buffers. We should not use state buffer to refer to the former. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: constify ilo_render in ilo_render_get_sample_position()Chia-I Wu2014-09-262-2/+2
| | | | | | It is a getter and is not supposed to modify ilo_render. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: rename 3d_pipeline to renderChia-I Wu2014-09-2610-883/+884
| | | | | | Follow the file renaming. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: remove struct ilo_3dChia-I Wu2014-09-266-232/+167
| | | | | | | | Move members of ilo_3d that still make sense to ilo_context. With ilo_3d gone, rename functions whose names begin with ilo_3d to something more appropriate. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: rename ilo_3d_pipeline*.[ch] to ilo_render*.[ch]Chia-I Wu2014-09-268-24/+24
| | | | | | They are used to build render engine commands, which can be more than 3D. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: rename ilo_3d.[ch] to ilo_draw.[ch]Chia-I Wu2014-09-266-9/+9
| | | | | | | There is not much left in struct ilo_3d. We want to kill it and ilo_3d.[ch] will be bad names. Signed-off-by: Chia-I Wu <[email protected]>
* gallium/ilo: add automake target 'template'Emil Velikov2014-09-241-0/+11
| | | | | | | | Rather than duplicating the libdeps, extra define... all over the targets, define them only once and use when applicable. Signed-off-by: Emil Velikov <[email protected]> Acked-by: Matt Turner <[email protected]>
* ilo: rework pipeline workaroundsChia-I Wu2014-09-233-228/+339
| | | | | | | | Add current_pipe_control_dw1 and deferred_pipe_control_dw1 to track what have been done since lsat 3DPRIMITIVE and what need to be done before next 3DPRIMITIVE. Based on them, we can emit WAs more smartly. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: remove handle_invalid_batch_bo()Chia-I Wu2014-09-233-67/+32
| | | | | | | | | | | | | | It was used to set has_gen6_wa_pipe_control to false when the batch buffer changed. When called from emit_flush() and others, it also unset ILO_3D_PIPELINE_INVALIDATE_BATCH_BO so that the following emit_draw() will not set has_gen6_wa_pipe_control to false again. It sounded error-prone and was just ugly. We should be able to achieve the same goal by reset has_gen6_wa_pipe_control in ilo_3d_pipeline_invalidate(). With handle_invalid_batch_bo() gone, the emit functions can also be inlined. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: make gen6_pipeline_update_max_svbi() staticChia-I Wu2014-09-233-8/+1
| | | | | | | We do not need to call it from GEN7 pipeline anymore since software PIPE_QUERY_PRIMITIVES_EMITTED is gone. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: clean up fallback path for primitive restartChia-I Wu2014-09-221-160/+74
| | | | | | | We should be able to draw with the index buffer mapped. That simplifies things a lot. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: handle conditional rendering in the contextChia-I Wu2014-09-228-65/+58
| | | | | | Conditional rendering is not limited to draw_vbo(). Move the support to ilo_context, and replace ilo_3d_pass_render_condition() by ilo_skip_rendering().
* ilo: create the pipeline from the builderChia-I Wu2014-09-225-15/+7
| | | | The pipeline needs just the builder to build commands. It does not need CP.
* ilo: move aperture checks out of pipelineChia-I Wu2014-09-223-72/+69
| | | | | They can be done outside of the pipeline. Move them and let the pipeline focus on building commands.
* ilo: flush before setting SOL_RESETChia-I Wu2014-09-222-5/+8
| | | | | | | SOL_RESET happens before bo execution. It should not be observed by the commands that are already in the bo. Move the code out of the pipeline now that it submits.
* ilo: move size estimation check out of pipelineChia-I Wu2014-09-223-10/+10
| | | | It can be done outside of the pipeline. Let's move it.
* ilo: use a single list for queriesChia-I Wu2014-09-212-69/+8
| | | | | | | | We used different lists for different types of queries because we wanted to update software queries quickly. Now that there is no software queries, we are fine with a single list. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: replace software queries by hardware onesChia-I Wu2014-09-214-83/+47
| | | | | | | | Read PIPE_QUERY_PRIMITIVES_GENERATED and PIPE_QUERY_PRIMITIVES_EMITTED from hardware registers. Because all queries now have a bo, remove unnecessary checks for q->bo. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: support prim queries in ilo_3d_pipeline_emit_query()Chia-I Wu2014-09-211-0/+24
| | | | | | | Add support for PIPE_QUERY_PRIMITIVES_GENERATED and PIPE_QUERY_PRIMITIVES_EMITTED in ilo_3d_pipeline_emit_query(). Signed-off-by: Chia-I Wu <[email protected]>
* ilo: add ilo_3d_pipeline_emit_query()Chia-I Wu2014-09-216-180/+123
| | | | | | | | | | It replaces ilo_3d_pipeline_emit_write_timestamp(), ilo_3d_pipeline_emit_write_depth_count(), and ilo_3d_pipeline_emit_write_statistics(). Signed-off-by: Chia-I Wu <[email protected]>
* ilo: rework query supportChia-I Wu2014-09-218-402/+357
| | | | | | | This fixes some corner cases, but more importantly, the new code should be easier to reason about. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: clarify cp owning/releasingChia-I Wu2014-09-213-13/+20
| | | | | | | Make it own()'s responsibility to make room for release() and itself. To be able to do that, allow ilo_cp_submit() in own(). Signed-off-by: Chia-I Wu <[email protected]>
* ilo: add a pointer to builder in ilo_3d_pipelineChia-I Wu2014-09-204-187/+190
| | | | It saves quite some typings.
* ilo: add a helper for RECTLIST blitterChia-I Wu2014-09-203-33/+43
| | | | Add ilo_3d_draw_rectlist() for use by RECTLIST blitter.
* ilo: no direct ilo_context access in BLT blitterChia-I Wu2014-09-201-21/+20
| | | | | We need ilo_builder for command building and ilo_cp for size check. ilo_context is not used.
* ilo: fix headers in Makefile.sourcesChia-I Wu2014-09-201-5/+4
|
* ilo: add a new struct for context statesChia-I Wu2014-09-2020-654/+672
| | | | | | | | | | Move pipe states in ilo_context to the new ilo_state_vector. The motivation is that ilo_context consists of several loosely related things. When we need an ilo_context somewhere, we usually need only one or two of the things in it. This change makes ilo_state_vector one such thing. An immediate result is that we no longer need ilo_context in 3D pipelines, something we have planned for since early days.
* ilo: merge ilo_gpe.h to ilo_state*.hChia-I Wu2014-09-2013-544/+513
| | | | | Move the #define's and struct's to ilo_state.h. Move the inline functions and function declarations to ilo_state_gen.h.
* ilo: rename ilo_gpe_gen*.[ch]Chia-I Wu2014-09-205-9/+9
| | | | Rename them to ilo_state_gen*.[ch].
* ilo: make ilo_fence opaqueChia-I Wu2014-09-202-5/+7
| | | | It is manipulated only in ilo_screen.c.
* ilo: rename ILO_DEBUG=3dChia-I Wu2014-09-195-6/+6
| | | | | | It has been a bad name since we added the builder. Rename it to ILO_DEBUG=batch to match i965, and call ilo_builder_decode() from ilo_cp_submit_internal().
* ilo: rename ilo_cp_flush()Chia-I Wu2014-09-1911-52/+52
| | | | | | "Flush" is used for too many things already: pipe resource flush, pipe context flush, pipe transfer region flush, and hardware pipeline flush. Rename it to ilo_cp_submit(). As such, ILO_DEBUG=flush is renamed to ILO_DEBUG=submit.
* ilo: remove ilo_cp_empty()Chia-I Wu2014-09-193-22/+12
| | | | Call ilo_builder_batch_used() directly.
* ilo: simplify ilo_cp_set_owner()Chia-I Wu2014-09-195-129/+121
| | | | | | The simplification allows us to get rid of ilo_cp_set_ring() and ilo_cp_implicit_flush(). The 3D query code is refactored for the simplification.