summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/radeonsi_shader.c
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: Apply si_* file naming scheme.Andreas Hartmetz2014-01-141-2058/+0
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: fix FS_COLOR0_WRITES_ALL_CBUFS with mixed colorbuffer formatsMarek Olšák2013-12-121-25/+15
| | | | | | The 16bpc packing must be done separately for each render target. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use the colorbuffer count from the shader keyMarek Olšák2013-12-121-4/+2
| | | | | | | As a result, the initialization of write_all must be done before the compilation. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: Remove some stale XXX / FIXME commentsMichel Dänzer2013-12-051-4/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: add driver support for layered rendering and AMD_vertex_shader_layerMarek Olšák2013-12-031-1/+13
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: implement OpenGL edge flagsMarek Olšák2013-12-031-6/+46
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: implement texture buffer objectsMarek Olšák2013-11-041-5/+59
| | | | GLSL 1.40 is done.
* radeonsi: implement uniform buffer objectsMarek Olšák2013-11-041-28/+37
|
* radeonsi: Allow longer intrinsic namesKai Wasserbäch2013-10-301-1/+1
| | | | | | | | | | | Fixes a boat load of Piglit tests for me, which crashed like fdo#70913 before. Thanks to Michel Dänzer for the tip. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70913 Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: add the vertex shader position output if it's missingMarek Olšák2013-10-251-0/+13
| | | | | | This fixes a lockup in piglit/spec/glsl-1.40/execution/tf-no-position. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: respect semantic indices for COLOR[i] fragment shader outputsMarek Olšák2013-10-251-5/+2
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: Allow Sinking pass to move preloaded const/res/samplVincent Lejeune2013-10-131-5/+27
| | | | | This fixes a crash in Unigine Heaven 3.0, and probably in some others apps.
* radeonsi: pass alpha_ref value to PS in the user sgprVadim Girlin2013-10-131-2/+6
| | | | | | | | | | | | Currently it's hardcoded in the shader, so every change requires compilation of the shader variant, killing the performance in Serious Sam 3 and probably other apps. This patch passes alpha_ref in the user sgpr and removes it from the shader key. Signed-off-by: Vadim Girlin <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeon/llvm: show LLVM disassembly when availableJay Cornwall2013-10-121-1/+1
| | | | | | | | With code dump enabled LLVM may generate disassembly during compilation. Show this disassembly when available and prefer it to SI bytecode dump. Reviewed-by: Tom Stellard <[email protected]> Signed-off-by: Jay Cornwall <[email protected]>
* radeonsi/compute: Fix segfault caused by recent refactoringTom Stellard2013-10-031-2/+2
| | | | Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: move debug options to R600_DEBUGMarek Olšák2013-09-291-6/+2
|
* radeonsi: simplify and fix MSAA texture sampling for array texturesMarek Olšák2013-09-201-26/+15
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix textureOffset and texelFetchOffset GLSL functionsMarek Olšák2013-09-201-9/+23
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: fix gl_InstanceID with non-zero start_instanceMarek Olšák2013-09-131-3/+4
| | | | | | | | start_instance doesn't affect gl_InstanceID. There's no piglit test, but it's kinda obvious the code was wrong. Reviewed-by: Christian König <[email protected]>
* radeonsi: implement streamout shader supportMarek Olšák2013-09-131-10/+269
| | | | | | | | | | | The shader is responsible for writing to streamout buffers using the TBUFFER_STORE_FORMAT_* instructions. The locations of some input SGPRs and VGPRs are assigned dynamically, because the input SGPRs controlling streamout are not declared if they are not needed, decreasing the indices of all following inputs. Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: bind streamout buffers to VGT and the vertex shaderMarek Olšák2013-09-131-0/+1
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: use r600_common_context, r600_common_screen, r600_resourceMarek Olšák2013-08-311-6/+6
| | | | | | | | | Also r600_hw_context_priv.h and si_state_streamout.c are removed, because they are no longer needed. Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Tom Stellard <[email protected]>
* radeonsi: cleanup initialization of SGPR shader parametersMarek Olšák2013-08-311-13/+19
| | | | | | Reviewed-by: Michel Dänzer <[email protected]> Reviewed-by: Christian König <[email protected]> Tested-by: Tom Stellard <[email protected]>
* radeonsi: Also set the depth component mask bit for stencil-only exportsMichel Dänzer2013-08-261-1/+4
| | | | | | | | The stencil values come out wrong without this for some reason. 50 more little piglits. Cc: [email protected]
* radeonsi: Fix y/z/w component values of TGSI_SEMANTIC_FOG pixel shader inputsMichel Dänzer2013-08-221-0/+18
| | | | | | | | | They are defined as constant 0.0/0.0/1.0. Three more little piglits. Cc: [email protected] Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: remove useless code from tex_fetch_argsMarek Olšák2013-08-171-18/+0
| | | | | | The array slice has already been added to "address". Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: implement texture fetching for compressed MSAA textures (v2)Marek Olšák2013-08-171-5/+116
| | | | | | v2: use resource slots 16..31 for FMASK textures Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: implement GL_SAMPLE_ALPHA_TO_ONEMarek Olšák2013-08-171-0/+14
| | | | Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: Don't export unused clip distance vectors from vertex shaderMichel Dänzer2013-08-151-1/+9
| | | | | | | | E.g. the Source engine seems to always write to gl_ClipVertex, but normally doesn't enable any GL_CLIP_DISTANCEn states. This change removes some irrelevant parts from the generated vertex shader code in such cases. Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: Don't leave gaps between position exports from vertex shaderMichel Dänzer2013-08-151-56/+79
| | | | | | | | | | | If the vertex shader exports clip distances but not point size, use position exports 1/2 instead of 2/3 for the clip distances. Fixes geometry corruption in that case. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66974 Cc: [email protected] Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: Handle TGSI_OPCODE_DDX/Y using local memoryMichel Dänzer2013-07-101-1/+100
| | | | | | 16 more little piglits. Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: Handle TGSI_OPCODE_TXDMichel Dänzer2013-07-101-2/+25
| | | | | | One more little piglit. Reviewed-by: Tom Stellard <[email protected]>
* radeonsi: Handle TGSI TXQ opcodeMichel Dänzer2013-05-281-2/+32
|
* radeonsi: Add support for TGSI TXF opcodeMichel Dänzer2013-05-281-13/+50
|
* radeonsi: Use tgsi_util_get_texture_coord_dim()Michel Dänzer2013-05-281-25/+7
|
* radeonsi: Handle TGSI_SEMANTIC_CLIPDISTMichel Dänzer2013-05-281-4/+17
|
* radeonsi: Fix hardware state for dual source blendingMichel Dänzer2013-05-281-0/+5
| | | | | Set up CB_SHADER_MASK register according to pixel shader exports, and enable some minimal state for colour buffer 1 in case dual source blending is used.
* radeonsi: Handle TGSI_SEMANTIC_CLIPVERTEXMichel Dänzer2013-05-211-0/+62
| | | | | | 17 more little piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Fix handling of TGSI_SEMANTIC_PSIZEMichel Dänzer2013-05-211-1/+3
| | | | | | Two more little piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: increase array size for shader inputs and outputsMarek Olšák2013-05-211-0/+2
| | | | | | | | | | | and add assertions to prevent buffer overflow. This fixes corruption of the si_shader struct. NOTE: This is a candidate for the 9.1 branch. [ Cherry-pick of r600g commit da33f9b919039442e9ab51f9b1d1c83a73607133 ] Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Read config values from the .AMDGPU.config ELF sectionTom Stellard2013-04-151-7/+27
| | | | | | | | | Instead of emitting configuration values (e.g. number of gprs used) in a predefined order, the LLVM backend now emits these values in register/value pairs. The first dword contains the register address and the second dword contians the value to write. Reviewed-by: Michel Dänzer <[email protected]>
* radeon/llvm: Use a struct for storing compiled codeTom Stellard2013-04-151-18/+17
|
* radeonsi: remove sampler writemask v3Christian König2013-04-101-12/+7
| | | | | | | | v2: fix instrinsic name as well v3: LLVM revision incremented as well Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: Add compute support v3Tom Stellard2013-04-051-45/+54
| | | | | | | | | | | v2: - Only dump shaders when env variable is set. v3: - Don't emit VGT registers Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Michel Dänzer <[email protected]
* gallium: PIPE_COMPUTE_CAP_IR_TARGET - allow drivers to specify a processor v2Tom Stellard2013-04-051-1/+3
| | | | | | | | | | | | This target string now contains four values instead of three. The old processor field (which was really being interpreted as arch) has been split into two fields: processor and arch. This allows drivers to pass a more a more detailed description of the hardware to compiler frontends. v2: - Adapt to libclc changes Reviewed-by: Francisco Jerez <[email protected]>
* radeonsi: add instance divisor support v3Christian König2013-04-021-25/+42
| | | | | | | | v2: reduce key size, don't copy key around to much. v3: remove key size reduction Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add start instance supportChristian König2013-04-021-1/+12
| | | | | | | | This works different than on R600, we need to add the start instance manually. Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* radeonsi: add instanceid supportChristian König2013-04-021-3/+32
| | | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Tested-by: Michel Dänzer <[email protected]>
* radeonsi: add preloading for all samplersChristian König2013-03-261-12/+45
| | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: add preloading of all constantsChristian König2013-03-261-16/+51
| | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>