summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/shader
Commit message (Collapse)AuthorAgeFilesLines
* ilo: preliminary GEN 7.5 supportChia-I Wu2013-09-082-6/+24
| | | | | This is based on grepping for brw->is_haswell in i965 to see how GEN 7.5 differs from GEN 7. Slightly tested with Xonotic and some Mesa demos.
* ilo: implement new float comparison instructionsRoland Scheidegger2013-08-151-8/+12
| | | | | | untested. Reviewed-by: Chia-I Wu <[email protected]>
* ilo: support push constant model in shadersChia-I Wu2013-08-135-7/+126
| | | | | Source constants from URB constant data when the constant data can fit in the PCB.
* tgsi: rename the TGSI fragment kill opcodesBrian Paul2013-07-122-9/+9
| | | | | | | | | | | | | | | | | | | | | 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]>
* ilo: correctly initialize undefined registers in fsChia-I Wu2013-07-111-5/+15
| | | | | Initialize all 4 channels of undefined registers (that is, TEMPs that are used before being assigned) in FS.
* ilo: speed up ilo_shader_select_kernel_routing() a bitChia-I Wu2013-06-251-0/+4
| | | | | Remember the order of the source attributes and avoid recomputation when it does not change.
* ilo: move SBE setup code to ilo_shader.cChia-I Wu2013-06-252-1/+10
| | | | | | | | | 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.
* ilo: map SO registers at shader compile timeChia-I Wu2013-06-251-0/+2
| | | | | | | 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.
* ilo: introduce ilo_shader_cso for VSChia-I Wu2013-06-251-4/+2
| | | | | | | 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.
* ilo: clean up finalize_shader_states()Chia-I Wu2013-06-251-0/+2
| | | | | | | | 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.
* ilo: use multiple entry points for shader creationChia-I Wu2013-06-253-3/+3
| | | | | | | | | | | | 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().
* ilo: move internal shader interface to a new headerChia-I Wu2013-06-255-4/+216
| | | | | Move it to ilo_shader_internal.h. The goal is to make files not part of the compiler include only ilo_shader.h eventually.
* ilo: silence a compiler warningChia-I Wu2013-06-141-0/+2
| | | | The path should never be hit.
* tgsi: replace tgsi_file_names tgsi_file_names[] with tgsi_file_name() functionBrian Paul2013-06-071-2/+2
| | | | | | | | | This change came from the discovery that the STATIC_ASSERT to check that the number of register file strings didn't actually work. Similar changes could be made for the other string arrays in tgsi_string.c Reviewed-by: Jose Fonseca <[email protected]>
* ilo: add support for TEX2/TXB2/TXL2 in fsChia-I Wu2013-06-071-3/+3
| | | | They were already supported, just being rejected in the TGSI translator.
* ilo: add support for indirect access of CONST in FSChia-I Wu2013-05-271-1/+97
| | | | | Unlike other register files, CONST is read with a message and indirect access is easier to implement.
* ilo: remove our own type inferenceChia-I Wu2013-05-081-97/+27
| | | | tgsi_opcode_infer_{src,dst}_type() works just fine.
* ilo: use tgsi_util_get_texture_coord_dim()Chia-I Wu2013-05-083-92/+4
| | | | And remove toy_tgsi_get_texture_coord_dim().
* ilo: Add missing break statement in aos_tex TGSI_OPCODE_TEX2 case.Vinson Lee2013-05-071-0/+1
| | | | | | | Fixes "Missing break in switch" defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Chia-I Wu <[email protected]>
* ilo: correctly set return types of sampler messagesChia-I Wu2013-05-052-0/+3
| | | | | Correctly set the types of the temporaries. We do not want type conversions when moving the results to the final destinations.
* ilo: expose register indices of OUTs in ilo_shaderChia-I Wu2013-05-013-4/+29
| | | | | 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.
* ilo: use ilo_dev_info in toy compilerChia-I Wu2013-05-018-31/+31
| | | | | We need only dev->gen, but it makes sense to expose other information to the compiler.
* ilo: compile VS/GS/FS with the toy compilerChia-I Wu2013-04-264-0/+4442
|
* ilo: add a toy shader compilerChia-I Wu2013-04-2613-0/+8661
This is a simple shader compiler that performs almost zero optimizations. The generated code is usually much larger comparing to that generated by i965. The generated code also requires many more registers. Function-wise, it lacks register spilling and does not support most TGSI indirections. Other than those, it works alright.