summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* ilo: clean up 3D/media functionsChia-I Wu2014-09-153-205/+188
| | | | Mostly style changes to set dw[0] directly.
* ilo: fix gen6_3DSTATE_MULTISAMPLE()Chia-I Wu2014-09-151-1/+1
| | | | There was a typo introduced by 90f4b131fccae3a950864ed9ba15eea8edce915f.
* ilo: trust vertex element count moreChia-I Wu2014-09-141-3/+2
| | | | | | | | | | | We might run into ve->count == 0 and last_velement_edgeflag == true in gen6_3DSTATE_VERTEX_ELEMENTS() when the state tracker sets an invalid combination of VS and VE (does not seem to happen with st/mesa). Do not assume ve->count is positive when last_velement_edgeflag is true. Reported by Coverity. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: simplify src operand gathering in disassemblerChia-I Wu2014-09-141-15/+5
| | | | | | Always initialize the operand array to point to src0, src1, and src2. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: derive 3-src instructions from the opcode tableChia-I Wu2014-09-141-9/+2
| | | | | | One less switch statement to maintain. Signed-off-by: Chia-I Wu <[email protected]>
* ilo: clean up 3DPRIMITIVE functionsChia-I Wu2014-09-135-25/+24
| | | | Add ILO_PRIM_RECTANGLES to replace the rectlist bool.
* ilo: clean up 3D/media common functionsChia-I Wu2014-09-133-120/+42
| | | | | | Rename ilo_builder_batch_state_base_address() to gen6_state_base_address() for consistency and remove unused gen6_STATE_BASE_ADDRESS(). Reorder the code in gen6_PIPE_CONTROL() a bit. Finally, some mostly cosmetic changes.
* ilo: move 3D functions to ilo_builder_3d*.hChia-I Wu2014-09-139-2538/+2614
| | | | | | Move functions for the 3D pipeline to the new headers. We artificially split the functions into top (vertex processing) and bottom (pixel processing), to keep the headers at reasonable sizes.
* ilo: move media functions to ilo_builder_media.hChia-I Wu2014-09-134-173/+211
| | | | Move functions for the media pipeline to the new header.
* ilo: move GPE common functions to ilo_builder_render.hChia-I Wu2014-09-137-267/+303
| | | | Move 3D/media common functions to the new header.
* ilo: fix builder size checks for BLT buffer clear/copyChia-I Wu2014-09-121-4/+8
| | | | | | | | | In buf_clear_region() and buf_copy_region(), max_cmd_size was set to 0. If either of the functions is called and there is not enough space in the builder, the next ilo_cp_flush() will fail silently in a release build. Replace magic numbers by size defines in tex_clear_region()/tex_copy_region() for consistency and readability.
* ilo: reduce BLT function parametersChia-I Wu2014-09-122-142/+171
| | | | | Intruduce gen6_blt_bo and gen6_blt_xy_bo to describe BOs. In the extreme case of gen6_XY_SRC_COPY_BLT(), the number of parameters goes down from 18 to 8.
* ilo: clean up BLT functionsChia-I Wu2014-09-122-104/+91
| | | | Follow the changes for MI functions, but for BLT this time.
* ilo: clean up MI functionsChia-I Wu2014-09-123-40/+45
| | | | | With ilo_builder in place, some conventions we had to build commands are no longer needed.
* ilo: move BLT functions to ilo_builder_blt.hChia-I Wu2014-09-123-257/+296
| | | | Follow the changes for MI functions, but for BLT this time.
* ilo: move MI functions to ilo_builder_mi.hChia-I Wu2014-09-128-168/+192
| | | | | Have a centralized place for MI functions, and remove the duplicated gen6_MI_LOAD_REGISTER_IMM().
* ilo: add ILO_DEV_ASSERT()Chia-I Wu2014-09-125-113/+118
| | | | It replaces ILO_GPE_VALID_GEN().
* ilo: use an accessor for dev->genChia-I Wu2014-09-1224-171/+198
| | | | | It should enable us to do specialized builds by making the accessor return a constant.
* ilo: add GEN_EXTRACT() and GEN_SHIFT32()Chia-I Wu2014-09-124-133/+142
| | | | They replace READ() and SET_FIELD() that we have been using.
* ilo: remove ILO_GEN_GET_MAJOR()Chia-I Wu2014-09-121-1/+0
| | | | The last user has gone away.
* ilo: careful with empty fb state in ilo_gpe_set_fb()Chia-I Wu2014-09-122-1/+6
| | | | We cannot pass 0 as the width or height to ilo_gpe_init_view_surface_null().
* gallium: add a texture target to sampler view and a CAP to use itIlia Mirkin2014-09-121-0/+1
| | | | | | | | | | This allows a sampler view to have a different texture target than the underlying resource. This will be used to implement the type casting between 2d arrays and cube maps as specified in ARB_texture_view. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ilo: fix a compile error with -Werror=format-securityChia-I Wu2014-09-121-1/+1
| | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=83777