summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/ilo
AgeCommit message (Collapse)AuthorFilesLines
2013-06-28ilo: clean up states that use ilo_view_surfaceChia-I Wu1-13/+10
Use variables that are easier to remember what they are.
2013-06-28ilo: remove ilo_cbuf_state::countChia-I Wu4-17/+12
We can derive it from enabled_mask.
2013-06-28ilo: clean up ilo_set_constant_buffer()Chia-I Wu1-29/+44
Add loops that will be optimized away.
2013-06-28ilo: clean up states that take a start_slotChia-I Wu1-73/+99
They are similar, so clean them up to make them look similar.
2013-06-28ilo: use shorter names for dirty flagsChia-I Wu7-141/+138
The new names match those of ilo_context's members respectively, and are shorter.
2013-06-28ilo: track if primitive restart has changedChia-I Wu3-1/+8
Re-emit 3DSTATE_INDEX_BUFFER to enable/disable primitive restart.
2013-06-28ilo: avoid potential dangling pointer dereferenceChia-I Wu1-0/+3
Set pipe_draw_info to NULL after draw_vbo().
2013-06-27ilo: plug a potential index buffer leakChia-I Wu1-0/+1
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.
2013-06-26ilo: Remove max_threads dead code path.Vinson Lee1-3/+0
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>
2013-06-26ilo: use a bitmask for enabled constant buffersChia-I Wu2-11/+14
Looping over 4 * 13 constant buffers while in most cases only two are enabled is stupid.
2013-06-26ilo: support PIPE_CAP_USER_INDEX_BUFFERSChia-I Wu9-36/+97
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.
2013-06-26ilo: make pipe_draw_info a context stateChia-I Wu9-39/+33
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.
2013-06-26ilo: support PIPE_CAP_USER_CONSTANT_BUFFERSChia-I Wu5-23/+88
We need it for HUD support, and will need it for push constants in the future.
2013-06-25ilo: honor render condition in blitterChia-I Wu4-8/+23
Make pass_render_condition() available for blitter, and check for render condition in (and only in) clear(), clear_render_target(), and clear_depth_stencil().
2013-06-25ilo: remove ilo_shader_internal.h from GEN6 pipelineChia-I Wu3-38/+55
Replace direct shader accesses with ilo_shader_get_kernel_param() and etc.
2013-06-25ilo: remove ilo_shader_internal.h from GEN7 pipelineChia-I Wu1-11/+6
Replace direct shader accesses with ilo_shader_get_kernel_param() and etc.
2013-06-25ilo: speed up ilo_shader_select_kernel_routing() a bitChia-I Wu2-4/+32
Remember the order of the source attributes and avoid recomputation when it does not change.
2013-06-25ilo: move SBE setup code to ilo_shader.cChia-I Wu6-155/+237
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.
2013-06-25ilo: use ilo_shader_state exclusively in GPEChia-I Wu6-107/+44
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.
2013-06-25ilo: map SO registers at shader compile timeChia-I Wu6-37/+72
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.
2013-06-25ilo: use ilo_shader_cso for FSChia-I Wu8-154/+255
Add ilo_gpe_init_fs_cso() to construct 3DSTATE_PS and shader part of 3DSTATE_WM once and early for fragment shaders.
2013-06-25ilo: use ilo_rasterizer_state exclusively in GPEChia-I Wu5-15/+17
Replace pipe_rasterizer_state by ilo_rasterizer_state for the remaining GPE functions for consistency.
2013-06-25ilo: convert pipe_rasterizer_state to ilo_rasterizer_wmChia-I Wu7-62/+141
Add ilo_gpe_init_rasterizer_wm() to construct fixed-function part of 3DSTATE_WM once in create_rasterizer_state().
2013-06-25ilo: use ilo_shader_cso for GSChia-I Wu7-145/+225
Add ilo_gpe_init_gs_cso() to construct 3DSTATE_GS once and early for geometry shaders.
2013-06-25ilo: introduce ilo_shader_cso for VSChia-I Wu7-42/+102
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.
2013-06-25ilo: add functions to query shadersChia-I Wu2-0/+152
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.
2013-06-25ilo: clean up finalize_shader_states()Chia-I Wu4-62/+79
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.
2013-06-25ilo: use multiple entry points for shader creationChia-I Wu6-32/+96
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().
2013-06-25ilo: move internal shader interface to a new headerChia-I Wu13-183/+226
Move it to ilo_shader_internal.h. The goal is to make files not part of the compiler include only ilo_shader.h eventually.
2013-06-20ilo: replace a boolean by boolChia-I Wu1-1/+1
bool is used internally. This is just cosmetic.
2013-06-20ilo: rename cache_seqno to uploadedChia-I Wu2-6/+6
It has been used as a bool since shader cache rework.
2013-06-19ilo: rework shader cacheChia-I Wu9-186/+356
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.
2013-06-18gallium: add condition parameter to render_conditionRoland Scheidegger2-1/+4
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>
2013-06-18ilo: construct depth/stencil command in create_surface()Chia-I Wu6-271/+368
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().
2013-06-17ilo: add pipe-based copy method to ilo_blitterChia-I Wu2-5/+25
It enables accelerated resource_copy_region() when blt-based method fails.
2013-06-17ilo: add BLT-based blitting methods to ilo_blitterChia-I Wu4-495/+847
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.
2013-06-17ilo: replace util_blitter by ilo_blitterChia-I Wu7-103/+363
ilo_blitter is just a wrapper for util_blitter for now. We will port BLT code to ilo_blitter shortly.
2013-06-15ilo: fix for half-float vertex arraysChia-I Wu1-1/+14
Commit 6fe0453c339b6e894e0ee8d2200e7638a43ed21e broke half-float vertex arrays. This reverts a part of that commit, and explains why.
2013-06-14ilo: add some assertions to help debuggingChia-I Wu1-1/+23
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.
2013-06-14ilo: silence a compiler warningChia-I Wu1-0/+2
The path should never be hit.
2013-06-13ilo: mapping a resource may make some states dirtyChia-I Wu4-9/+112
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.
2013-06-13ilo: bump up PIPE_CAP_GLSL_FEATURE_LEVEL to 140Chia-I Wu1-1/+1
With UBO and TBO support, we are supposedly good to claim GLSL 1.40.
2013-06-13ilo: initialize dirty flags in ilo_init_states()Chia-I Wu2-2/+2
Now that we have a function to initialize states, initialize dirty flags there too.
2013-06-13ilo: re-emit states that involve resourcesChia-I Wu4-21/+23
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().
2013-06-13ilo: fix for util_blitter_clear() changesChia-I Wu1-4/+1
It has been broken since 17350ea979b883662573dac136cd9efb49938210.
2013-06-12ilo: update winsys interfaceChia-I Wu1-7/+14
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.
2013-06-12ilo: get rid of function tables in winsysChia-I Wu14-90/+88
We are moving toward making struct intel_bo alias drm_intel_bo. As a first step, we cannot have function tables.
2013-06-12ilo: access bo size directlyChia-I Wu1-2/+2
buf->bo_size is readily avaiable, no need to go via buf->bo->get_size().
2013-06-12ilo: remove unnecessary tex_set_bo/buf_set_boChia-I Wu1-42/+18
Merge the bodies to tex_create_bo/buf_create_bo respectively.
2013-06-08ilo: fix textureSize() for single-layered array texturesChia-I Wu1-2/+18
We returned 0 instead of 1 for the number of layers when the array texutre is single-layered. This fixed it on GEN7+.