| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Cc: [email protected]
[ Francisco Jerez: Fix "PIPE_ENDIAN_SMALL" in the documentation,
define PIPE_ENDIAN_NATIVE. ]
|
|
|
|
|
|
| |
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 compiler does not know that ilo_3d_pipeline_estimate_size() is pure and
can be eliminated in a release build in gen6_pipeline_end(). Move the call
into the assert().
|
|
|
|
|
| |
The checks may seem redundant because cso_context handles them, but
util_blitter does not have access to cso_context.
|
|
|
|
|
| |
Document why certain states need to be saved, and fix a bug when blitting with
scissor enabled.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TGSI_OPCODE_KIL and KILP had confusing names. The former was conditional
kill (if any src component < 0). The later was unconditional kill.
At one time KILP was supposed to work with NV-style condition
codes/predicates but we never had that in TGSI.
This patch renames both opcodes:
TGSI_OPCODE_KIL -> KILL_IF (kill if src.xyzw < 0)
TGSI_OPCODE_KILP -> KILL (unconditional kill)
Note: I didn't just transpose the opcode names to help ensure that I
didn't miss updating any code anywhere.
I believe I've updated all the relevant code and comments but I'm
not 100% sure that some drivers had this right in the first place.
For example, the radeon driver might have llvm.AMDGPU.kill and
llvm.AMDGPU.kilp mixed up. Driver authors should review their code.
Reviewed-by: Jose Fonseca <[email protected]>
|
|
|
|
| |
So that there are at most (2^22 * 6) texels, lower than the 2^26 limit.
|
|
|
|
|
| |
Initialize all 4 channels of undefined registers (that is, TEMPs that are used
before being assigned) in FS.
|
|
|
|
| |
The PRM specifies several padding requirements that we failed to honor.
|
|
|
|
|
|
| |
Not needed with do_dead_builtin_varyings.
Reviewed-by: Ian Romanick <[email protected]>
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Chia-I Wu <[email protected]>
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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.
|