summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/ilo/ilo_shader.h
AgeCommit message (Collapse)AuthorFilesLines
2013-08-13ilo: support copying constant buffer 0 to PCBChia-I Wu1-0/+1
Add ILO_KERNEL_PCB_CBUF0_SIZE so that a kernel can specify how many bytes of constant buffer 0 need to be copied to PCB.
2013-08-13ilo: make constant buffer 0 upload optionalChia-I Wu1-0/+1
Add ILO_KERNEL_SKIP_CBUF0_UPLOAD so that we can skip constant buffer 0 upload when the kernel does not need it.
2013-06-25ilo: move SBE setup code to ilo_shader.cChia-I Wu1-0/+18
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: map SO registers at shader compile timeChia-I Wu1-0/+3
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: introduce ilo_shader_cso for VSChia-I Wu1-0/+4
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 Wu1-0/+38
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 Wu1-0/+5
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 Wu1-3/+19
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 Wu1-179/+3
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: rename cache_seqno to uploadedChia-I Wu1-1/+1
It has been used as a bool since shader cache rework.
2013-06-19ilo: rework shader cacheChia-I Wu1-26/+24
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-05-30ilo: simplify shader variant handlingCourtney Goeltzenleuchter1-2/+0
Remove hash function on shader variants. Nature of variants limits them to a small number and thus its more efficient to just do a memory compare of the actual shader structures rather than compute and compare hashes.
2013-05-01ilo: expose register indices of OUTs in ilo_shaderChia-I Wu1-0/+1
pipe_stream_output_info tells us which of OUT[i] needs to be written out. We need the info to map OUT[i] to VUE offset.
2013-05-01ilo: use ilo_dev_info in toy compilerChia-I Wu1-1/+1
We need only dev->gen, but it makes sense to expose other information to the compiler.
2013-04-26ilo: compile VS/GS/FS with the toy compilerChia-I Wu1-20/+14
2013-04-26ilo: add functions to manage shadersChia-I Wu1-0/+249
This commits add shader cache, shader state, shader variant, and etc. It does not add the shader compiler though.