| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
| |
We should be able to draw with the index buffer mapped. That simplifies
things a lot.
Signed-off-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
| |
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().
|
|
|
|
| |
The pipeline needs just the builder to build commands. It does not need CP.
|
|
|
|
|
| |
They can be done outside of the pipeline. Move them and let the pipeline
focus on building commands.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
It can be done outside of the pipeline. Let's move it.
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
|
|
|
| |
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]>
|
|
|
|
| |
Add ilo_3d_draw_rectlist() for use by RECTLIST blitter.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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().
|
|
|
|
|
|
| |
"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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
It should enable us to do specialized builds by making the accessor return a
constant.
|
|
|
|
|
|
|
|
|
|
| |
Make these changes
ilo_cp_begin() -> ilo_builder_batch_pointer()
ilo_cp_write() -> direct memory set
ilo_cp_write_bo() -> ilo_builder_batch_reloc()
and use this chance to drop the "_emit_" infix.
|
|
|
|
|
|
| |
Remove instruction buffer management from ilo_3d and adapt ilo_shader_cache to
upload kernels to ilo_builder. To be able to do that, we also let ilo_builder
manage STATE_BASE_ADDRESS.
|
|
|
|
|
| |
This makes ilo_cp use the builder to manage batch buffers, and use
ilo_builder_decode() to replace ilo_3d_pipeline_dump().
|
|
|
|
|
| |
It is simpler and is supported by the kernel. It cannot be used with
libdrm_intel yet though.
|
| |
|
|
|
|
| |
The code paths are not tested for a while, and have some known issues.
|
|
|
|
|
| |
It results in less code despite that i915_drm.h specifies the ring type as
part of the execution flags.
|
|
|
|
|
|
| |
The only alloc flag is INTEL_ALLOC_FOR_RENDER, which can as well be expressed
by specifying the initial write domain. The change makes it obvious that we
failed to set INTEL_ALLOC_FOR_RENDER in several places.
|
|
|
|
| |
Make the map functions return the pointer directly.
|
|
|
|
|
|
| |
When the depth buffer is to be read, perform a Depth Buffer Resolve if it has
been rendered. When the depth buffer is to be rendered, perform a HiZ Buffer
Resolve when the depth buffer is modified externally.
|
|
|
|
|
|
| |
Add blitter functions to perform Depth Buffer Clear, Depth Buffer Resolve, and
Hierarchical Depth Buffer Resolve. Those functions set ilo_blitter up and
pass it to the pipelines to emit the commands.
|
|
|
|
|
|
|
|
| |
When specified, ilo will print a line similar to
cp flushed for render with 949+888 DWords (22.4%) because of frame end
for every ilo_cp_flush() call.
|
|
|
|
| |
It can print out pipe_draw_info and the dirty bits set, useful for debugging.
|
|
|
|
|
|
| |
When only the offset to the index buffer is changed, we can skip the
3DSTATE_INDEX_BUFFER if we always use 0 for the offset, and add
(offset / index_size) to Start Vertex Location in 3DPRIMITIVE.
|
|
|
|
|
| |
The new names match those of ilo_context's members respectively, and are
shorter.
|
|
|
|
| |
Set pipe_draw_info to NULL after draw_vbo().
|
|
|
|
|
|
|
|
| |
We want to access the user buffer, if available, when primitive restart is
enabled and the restart index/primitive type is not natively supported.
And since we are handling index buffer uploads in the driver with this change,
we can also work around misalignment of index buffer offsets.
|
|
|
|
|
|
| |
Rename ilo_finalize_states() to ilo_finalize_3d_states(), and bind
pipe_draw_info to the context when it is called. This saves us from having to
pass pipe_draw_info around in several places.
|
|
|
|
|
|
| |
Make pass_render_condition() available for blitter, and check for render
condition in (and only in) clear(), clear_render_target(), and
clear_depth_stencil().
|
|
|
|
|
|
|
|
|
| |
The new code makes the shader cache manages all shaders and be able to upload
all of them to a caller-provided bo as a whole.
Previously, we uploaded only the bound shaders. When a different set of
shaders is bound, we had to allocate a new kernel bo to upload if the current
one is busy.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For conditional rendering this makes it possible to skip rendering
if either the predicate is true or false, as supported by d3d10
(in fact previously it was sort of implied skip rendering if predicate
is false for occlusion predicate, and true for so_overflow predicate).
There's no cap bit for this as presumably all drivers could do it trivially
(but this patch does not implement it for the drivers using true
hw predicates, nvxx, r600, radeonsi, no change is expected for OpenGL
functionality).
Reviewed-by: Jose Fonseca <[email protected]>
|
|
|
|
|
|
|
|
|
| |
When a resource is busy and is mapped with
PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE, the underlying bo is replaced. We need
to mark states affected by the resource dirty.
With this change, we no longer have to emit vertex buffers and index buffer
unconditionally.
|
|
|
|
|
| |
We are moving toward making struct intel_bo alias drm_intel_bo. As a first
step, we cannot have function tables.
|
|
|
|
|
|
|
|
|
|
| |
Define and use
struct ilo_vb_state;
struct ilo_ve_state;
struct ilo_ib_state;
in ilo_context.
|
|
|
|
|
|
|
|
|
| |
need_flush was uninitialized if hw3d->new_batch was true.
Fixes "Uninitialized scalar variable" defect reported by Coverity.
Signed-off-by: Vinson Lee <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
|
|
|
|
|
|
| |
No need to emit 3DSTATE_SO_BUFFER and 3DSTATE_SO_DECL_LIST when SO is
disabled. As the implicit flush done by the commands is also gone, emit an
explicit flush.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The problem with cp hooks is that when we switch from 3D ring to 2D ring, and
when there are active queries, we will emit 3D commands to 2D ring because
the new-batch hook is called.
This commit introduces the idea of cp owner. When the cp is flushed, or when
another owner takes place, the current owner is notified, giving it a chance
to emit whatever commands there need to be. With this mechanism, we can
resume queries when the 3D pipeline owns the cp, and pause queries when it
loses the cp. Ring switch will just work.
As we still need to know when the cp bo is reallocated, a flush callback is
added.
|
|
|
|
|
| |
The hardware context should not be passed for bo execution when the ring is
not the render ring. Rename hw_ctx to render_ctx for clarity.
|
|
|
|
|
|
|
|
|
| |
Now tells Gallium that ilo supports primitive restart.
Updated ilo_draw_vbo to be able to check that the indexed
primitive being rendered can actually be supported in HW. If not,
will break up into individual prims similar to what Mesa does.
[olv: a minor fix after rebasing and formatting]
|
|
|
|
|
| |
We need only dev->gen and dev->gt, but it makes sense to expose other
information to the pipeline.
|
|
|
|
|
| |
The struct is used to describe the device information, such as PCI ID, GEN,
GT, and etc.
|
| |
|