aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_shader.c
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: use tgsi_shader_info in si_llvm_emit_fs_epilogueMarek Olšák2014-10-121-71/+61
| | | | | | | | | This is the last use tgsi_parse_token in radeonsi. It looks ugly because the code was re-indented, but there is really no change in behavior. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove si_shader_output_values::indexMarek Olšák2014-10-121-17/+6
| | | | | | | | It's redundant now. It led to a simplification in si_llvm_emit_streamout, because outidx == reg. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use tgsi_shader_info in si_llvm_emit_vs_epilogueMarek Olšák2014-10-121-26/+13
| | | | | | That code was really ugly. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove shader->input[] and output[] arrays and dependenciesMarek Olšák2014-10-121-67/+0
| | | | | | | | | They were reinventing tgsi_shader_info. They are unused now. radeon_llvm_context::load_input can be NULL if input fetching is implemented in some other way. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: move param_offset out of shader->input[] and output[]Marek Olšák2014-10-121-5/+5
| | | | | | Those are going away. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use tgsi_shader_info to get a list of GS outputsMarek Olšák2014-10-121-12/+10
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use tgsi_shader_info in si_shader_psMarek Olšák2014-10-121-1/+0
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use tgsi_shader_info in fetch_input_gsMarek Olšák2014-10-121-4/+5
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't rely on shader->output in si_llvm_emit_fs_epilogueMarek Olšák2014-10-121-1/+1
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use tgsi_shader_info in si_llvm_emit_es_epilogueMarek Olšák2014-10-121-17/+5
| | | | | | tgsi_shader_info contains everything we need. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't recompile shaders when changing nr_cbufs from 0 to 1Marek Olšák2014-10-121-2/+2
| | | | | | Both cases are equivalent. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove vs.ucps_enabled from the shader keyMarek Olšák2014-10-121-6/+0
| | | | | | Written CLIPDIST outputs are simply disabled in PA_CL_VS_OUT_CNTL. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: assume ClipDistance usage mask is always 0xfMarek Olšák2014-10-121-7/+2
| | | | | | | | | | | | No code in Mesa sets the usage mask to any other value. The final mask is AND'ed with enable bits from the rasterizer state anyway. If somebody implements setting usage masks in st/mesa, we can use tgsi_shader_info to get it more easily. This is a prerequisite for the following commit. Reviewed-by: Michel Dänzer <[email protected]>
* tgsi: change tgsi_shader_info::properties to a one-dimensional arrayMarek Olšák2014-10-041-2/+2
| | | | | | Reviewed-by: Roland Scheidegger <[email protected]> v2: fix svga too
* radeonsi: set number of userdata SGPRs of GS copy shader to 4Marek Olšák2014-10-041-1/+8
| | | | | | | It only needs the constant buffer with clip planes and read-write resources for the GS->VS ring and streamout. That's 2 pointers. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: pass the GS shader directly to si_generate_gs_copy_shaderMarek Olšák2014-10-041-3/+3
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: set LLVMByValAttribute for all descriptor arraysMarek Olšák2014-10-041-10/+7
| | | | | | I hope this is correct. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove interp_at_sample from the key, use TGSI_INTERPOLATE_LOC_SAMPLEMarek Olšák2014-10-041-2/+2
| | | | | | | | | st/mesa has the same flag in its shader key, we don't need to do it in the driver anymore. Instead, use TGSI_INTERPOLATE_LOC_SAMPLE, which is what st/mesa sets. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: move geometry shader properties from si_shader to si_shader_selectorMarek Olšák2014-10-041-18/+6
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove unused variable si_shader::gs_input_primMarek Olšák2014-10-041-2/+0
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: get fs_write_all from tgsi_shader_info directlyMarek Olšák2014-10-041-6/+2
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* tgsi: simplify shader properties in tgsi_shader_infoMarek Olšák2014-10-041-36/+17
| | | | Use an array of properties indexed by TGSI_PROPERTY_* definitions.
* radeonsi: get tgsi_shader_info only once before compilationMarek Olšák2014-10-041-14/+11
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: properly destroy the GS copy shader and scratch_bo for computeMarek Olšák2014-09-241-0/+4
| | | | | Cc: 10.2 10.3 <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't pass the context to the shader translatorMarek Olšák2014-09-241-16/+13
| | | | | | This should prevent accessing context state there. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: don't snoop currently-bound GS shader when compiling ESMarek Olšák2014-09-241-15/+92
| | | | | | | | | Instead, pass the layout of GS inputs in memory to the ES using the shader key. Only 64 bits are needed to represent the layout in the key. Mixing and matching different VS and GS shaders should now always work. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: shorten si_pipe_* prefixes to si_*Marek Olšák2014-09-241-3/+3
| | | | | | | This was the original naming convention in r600g and it somehow crept into radeonsi. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: merge si_pipe_shader into si_shaderMarek Olšák2014-09-241-28/+28
| | | | | | One is part of the other anyway. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: set KILL_ENABLE during shader compilation, remove uses_kill flagMarek Olšák2014-09-241-1/+5
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: remove shader.ps_conservative_z, set db_shader_control insteadMarek Olšák2014-09-241-3/+4
| | | | | | Also set the field on SI too. It's not just specific to CIK. Reviewed-by: Michel Dänzer <[email protected]>
* gallium/radeon: cleanup header inclusionEmil Velikov2014-08-281-2/+2
| | | | | | | | | | | | | | - Add top_srcdir/src/gallium/winsys to GALLIUM_DRIVER_C{XXFLAGS}. - Remove top_srcdir/src/gallium/drivers/radeon from the includes. As a result: - Common radeon headers are prefixed with 'radeon/' - Winsys header inclusion is prefixed 'radeon/drm' Cc: Marek Olšák <[email protected]> Cc: Michel Dänzer <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: don't set CB_SHADER_MASK=1 if there are no color outputsMarek Olšák2014-08-191-4/+0
| | | | | | This hack isn't needed anymore because of the previous u_blitter commit. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: Use util_memcpy_cpu_to_le32()Tom Stellard2014-07-281-16/+7
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi/compute: Add support scratch buffer support v2Tom Stellard2014-07-211-0/+5
| | | | | | | | The scratch buffer will be used for private memory and also register spilling. v2: - Code cleanups
* radeonsi: Read rodata from ELF and append it to the end of shadersTom Stellard2014-07-211-1/+12
| | | | | | | The is used for programs that have arrays of constants that are accessed using dynamic indices. The shader will compute the base address of the constants and then access them using SMRD instructions.
* radeonsi: use an SGPR instead of VGT_INDX_OFFSETMarek Olšák2014-07-181-4/+7
| | | | | | | | The draw indirect packets cannot set VGT_INDX_OFFSET, they can only set user data SGPRs. This is the only way to support start/index_bias with indirect drawing. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: assume LLVM 3.4.2 is always presentMarek Olšák2014-07-181-14/+0
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: partially revert "switch descriptors to i32 vectors"Marek Olšák2014-07-141-0/+12
| | | | It indeed breaks LLVM 3.4.2.
* radeonsi: rename definitions of shader limitsMarek Olšák2014-07-111-17/+17
| | | | Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: switch descriptors to i32 vectorsMarek Olšák2014-07-111-13/+16
| | | | | | This is a follow-up to the commit which adds texture fetches with offsets. Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: properly implement texture opcodes that take an offsetMarek Olšák2014-07-111-84/+104
| | | | | | | | | | | | Instead of using intr_name in lp_build_tgsi_action, this selects the names with a switch statement in the emit function. This allows emitting llvm.SI.sample for instructions without offsets and llvm.SI.image.sample.*.o otherwise. This depends on my LLVM changes. When LLVM 3.5 is released, I'll switch all texture instructions to the new intrinsics.
* radeonsi: fix texture fetches with derivatives for 1DArray and 3D texturesMarek Olšák2014-07-111-4/+30
|
* radeonsi: fix samplerCubeShadow with biasMarek Olšák2014-07-111-6/+6
| | | | | | Pack the depth value before overwriting it with cube coordinates. Cc: [email protected]
* gallium: switch dedicated centroid field to interpolation locationIlia Mirkin2014-07-091-3/+3
| | | | | | | | The new location field can be either center, centroid, or sample, which indicates the location that the shader should interpolate at. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* radeonsi: implement ARB_texture_query_lodMarek Olšák2014-06-191-24/+39
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: pass ARB_conservative_depth parameters to the hardwareMarek Olšák2014-06-191-1/+20
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: cosmetic changes in si_shader.cMarek Olšák2014-06-191-18/+13
| | | | reviewed by Michel Dänzer
* radeonsi: implement ARB_texture_gather and Gather functions from GLSL 4.00Marek Olšák2014-06-191-8/+115
| | | | | | All ARB_texture_gather and gather-related ARB_gpu_shader5 piglit tests pass. reviewed by Michel Dänzer
* radeonsi: fixup sizes of shader resource and sampler arraysMarek Olšák2014-06-161-2/+2
| | | | | | | This was wrong for a very long time. I wonder if the array size has any effect on anything. Reviewed-by: Christian König <[email protected]>
* radeonsi: implement SAMPLEMASK fragment shader outputMarek Olšák2014-06-021-3/+15
|