Age | Commit message (Collapse) | Author | Files | Lines |
|
Use variables that are easier to remember what they are.
|
|
We can derive it from enabled_mask.
|
|
Add loops that will be optimized away.
|
|
They are similar, so clean them up to make them look similar.
|
|
The new names match those of ilo_context's members respectively, and are
shorter.
|
|
Re-emit 3DSTATE_INDEX_BUFFER to enable/disable primitive restart.
|
|
Set pipe_draw_info to NULL after draw_vbo().
|
|
This is harmless since st_context and u_vbuf both set index buffer to NULL
before destroying themselves. But we do not want to rely on that behavior.
|
|
max_threads cannot be greater than 28. It is either 21 or 28.
Fixes "Logically dead code" defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
|
|
Looping over 4 * 13 constant buffers while in most cases only two are enabled
is stupid.
|
|
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.
|
|
We need it for HUD support, and will need it for push constants in the future.
|
|
Make pass_render_condition() available for blitter, and check for render
condition in (and only in) clear(), clear_render_target(), and
clear_depth_stencil().
|
|
Replace direct shader accesses with ilo_shader_get_kernel_param() and etc.
|
|
Replace direct shader accesses with ilo_shader_get_kernel_param() and etc.
|
|
Remember the order of the source attributes and avoid recomputation when it
does not change.
|
|
Add ilo_shader_select_kernel_routing() to construct 3DSTATE_SBE. It is called
in ilo_finalize_states(), rather than in create_fs_state(), as it depends on
VS/GS and rasterizer states.
With this change, ilo_shader_internal.h is no longer needed for
ilo_gpe_gen6.c.
|
|
This allows us to remove ilo_shader_internal.h from ilo_gpe_gen7.c. The
unfinished code in 3DSTATE_DS, 3DSTATE_HS, and INTERFACE_DESCRIPTOR_DATA are
partly or entirely removed.
|
|
The unmodified pipe_stream_output_info describes its outputs as if they are in
TGSI_FILE_OUTPUT. Remap the register indices to where they appear in the VUE.
TGSI_SEMANTIC_PSIZE needs a little care because it is at the W channel.
|
|
Add ilo_gpe_init_fs_cso() to construct 3DSTATE_PS and shader part of
3DSTATE_WM once and early for fragment shaders.
|
|
Replace pipe_rasterizer_state by ilo_rasterizer_state for the remaining GPE
functions for consistency.
|
|
Add ilo_gpe_init_rasterizer_wm() to construct fixed-function part of
3DSTATE_WM once in create_rasterizer_state().
|
|
Add ilo_gpe_init_gs_cso() to construct 3DSTATE_GS once and early for geometry
shaders.
|
|
When a new VS kernel is generated, a newly added function,
ilo_gpe_init_vs_cso(), is called to construct 3DSTATE_VS command in
ilo_shader_cso. When the command needs to be emitted later, we copy the
command from the CSO instead of constructing it dynamically.
|
|
Add ilo_shader_get_type() to query the type (PIPE_SHADER_x) of the shader.
Add ilo_shader_get_kernel_offset() and ilo_shader_get_kernel_param() to query
the cache offset and various kernel parameters of the selected kernel.
|
|
Add ilo_shader_select_kernel() to replace the dependency table,
ilo_shader_variant_init(), and ilo_shader_state_use_variant().
With the changes, we no longer need to include ilo_shader_internal.h in
ilo_state.c.
|
|
Replace ilo_shader_state_create() by
ilo_shader_create_vs()
ilo_shader_create_gs()
ilo_shader_create_fs()
ilo_shader_create_cs()
Rename ilo_shader_state_destroy() to ilo_shader_destroy(). The old
ilo_shader_destroy() is renamed to ilo_shader_destroy_kernel().
|
|
Move it to ilo_shader_internal.h. The goal is to make files not part of the
compiler include only ilo_shader.h eventually.
|
|
bool is used internally. This is just cosmetic.
|
|
It has been used as a bool since shader cache rework.
|
|
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 <jfonseca@vmware.com>
|
|
Add ilo_gpe_init_zs_surface() to construct
3DSTATE_DEPTH_BUFFER
3DSTATE_STENCIL_BUFFER
3DSTATE_HIER_DEPTH_BUFFER
at surface creation time. This allows fast state emission in draw_vbo().
|
|
It enables accelerated resource_copy_region() when blt-based method fails.
|
|
Port BLT code in ilo_blit.c to BLT-based blitting methods of ilo_blitter. Add
BLT-based clears. The latter is verifed with util_clear(), but it is not in
use yet.
|
|
ilo_blitter is just a wrapper for util_blitter for now. We will port BLT code
to ilo_blitter shortly.
|
|
Commit 6fe0453c339b6e894e0ee8d2200e7638a43ed21e broke half-float vertex
arrays. This reverts a part of that commit, and explains why.
|
|
Assert that we do not support user vertex/index/constant buffers. Issue a
warning when a sampler view is created for a resource without
PIPE_BIND_SAMPLER_VIEW.
|
|
The path should never be hit.
|
|
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.
|
|
With UBO and TBO support, we are supposedly good to claim GLSL 1.40.
|
|
Now that we have a function to initialize states, initialize dirty flags there
too.
|
|
Even with hardware contexts, since we do not pin resources, we have to re-emit
the states so that the resources are referenced (by cp->bo) and their offsets
are updated in case they are moved. This also allows us to elimiate cp flush
in is_bo_busy().
|
|
It has been broken since 17350ea979b883662573dac136cd9efb49938210.
|
|
The motivation is to kill tiling and pitch in struct intel_bo. That requires
us to make tiling and pitch not queryable, and be passed around as function
parameters.
|
|
We are moving toward making struct intel_bo alias drm_intel_bo. As a first
step, we cannot have function tables.
|
|
buf->bo_size is readily avaiable, no need to go via buf->bo->get_size().
|
|
Merge the bodies to tex_create_bo/buf_create_bo respectively.
|
|
We returned 0 instead of 1 for the number of layers when the array texutre is
single-layered. This fixed it on GEN7+.
|