summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/radeonsi_shader.c
AgeCommit message (Collapse)AuthorFilesLines
2014-01-14radeonsi: Apply si_* file naming scheme.Andreas Hartmetz1-2058/+0
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-12-12radeonsi: fix FS_COLOR0_WRITES_ALL_CBUFS with mixed colorbuffer formatsMarek Olšák1-25/+15
The 16bpc packing must be done separately for each render target. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-12radeonsi: use the colorbuffer count from the shader keyMarek Olšák1-4/+2
As a result, the initialization of write_all must be done before the compilation. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-05radeonsi: Remove some stale XXX / FIXME commentsMichel Dänzer1-4/+1
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-12-03radeonsi: add driver support for layered rendering and AMD_vertex_shader_layerMarek Olšák1-1/+13
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-12-03radeonsi: implement OpenGL edge flagsMarek Olšák1-6/+46
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-11-04radeonsi: implement texture buffer objectsMarek Olšák1-5/+59
GLSL 1.40 is done.
2013-11-04radeonsi: implement uniform buffer objectsMarek Olšák1-28/+37
2013-10-30radeonsi: Allow longer intrinsic namesKai Wasserbäch1-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 <kai@dev.carbon-project.org> Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-10-25radeonsi: add the vertex shader position output if it's missingMarek Olšák1-0/+13
This fixes a lockup in piglit/spec/glsl-1.40/execution/tf-no-position. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-10-25radeonsi: respect semantic indices for COLOR[i] fragment shader outputsMarek Olšák1-5/+2
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-10-13radeonsi: Allow Sinking pass to move preloaded const/res/samplVincent Lejeune1-5/+27
This fixes a crash in Unigine Heaven 3.0, and probably in some others apps.
2013-10-13radeonsi: pass alpha_ref value to PS in the user sgprVadim Girlin1-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 <vadimgirlin@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-10-12radeon/llvm: show LLVM disassembly when availableJay Cornwall1-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 <thomas.stellard@amd.com> Signed-off-by: Jay Cornwall <jay@jcornwall.me>
2013-10-03radeonsi/compute: Fix segfault caused by recent refactoringTom Stellard1-2/+2
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2013-09-29radeonsi: move debug options to R600_DEBUGMarek Olšák1-6/+2
2013-09-20radeonsi: simplify and fix MSAA texture sampling for array texturesMarek Olšák1-26/+15
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-20radeonsi: fix textureOffset and texelFetchOffset GLSL functionsMarek Olšák1-9/+23
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-09-13radeonsi: fix gl_InstanceID with non-zero start_instanceMarek Olšák1-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 <christian.koenig@amd.com>
2013-09-13radeonsi: implement streamout shader supportMarek Olšák1-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 <michel.daenzer@amd.com>
2013-09-13radeonsi: bind streamout buffers to VGT and the vertex shaderMarek Olšák1-0/+1
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-08-31radeonsi: use r600_common_context, r600_common_screen, r600_resourceMarek Olšák1-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 <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
2013-08-31radeonsi: cleanup initialization of SGPR shader parametersMarek Olšák1-13/+19
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Tested-by: Tom Stellard <thomas.stellard@amd.com>
2013-08-26radeonsi: Also set the depth component mask bit for stencil-only exportsMichel Dänzer1-1/+4
The stencil values come out wrong without this for some reason. 50 more little piglits. Cc: mesa-stable@lists.freedesktop.org
2013-08-22radeonsi: Fix y/z/w component values of TGSI_SEMANTIC_FOG pixel shader inputsMichel Dänzer1-0/+18
They are defined as constant 0.0/0.0/1.0. Three more little piglits. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-08-17radeonsi: remove useless code from tex_fetch_argsMarek Olšák1-18/+0
The array slice has already been added to "address". Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-08-17radeonsi: implement texture fetching for compressed MSAA textures (v2)Marek Olšák1-5/+116
v2: use resource slots 16..31 for FMASK textures Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-08-17radeonsi: implement GL_SAMPLE_ALPHA_TO_ONEMarek Olšák1-0/+14
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-08-15radeonsi: Don't export unused clip distance vectors from vertex shaderMichel Dänzer1-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 <thomas.stellard@amd.com>
2013-08-15radeonsi: Don't leave gaps between position exports from vertex shaderMichel Dänzer1-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: mesa-stable@lists.freedesktop.org Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-07-10radeonsi: Handle TGSI_OPCODE_DDX/Y using local memoryMichel Dänzer1-1/+100
16 more little piglits. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-07-10radeonsi: Handle TGSI_OPCODE_TXDMichel Dänzer1-2/+25
One more little piglit. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-05-28radeonsi: Handle TGSI TXQ opcodeMichel Dänzer1-2/+32
2013-05-28radeonsi: Add support for TGSI TXF opcodeMichel Dänzer1-13/+50
2013-05-28radeonsi: Use tgsi_util_get_texture_coord_dim()Michel Dänzer1-25/+7
2013-05-28radeonsi: Handle TGSI_SEMANTIC_CLIPDISTMichel Dänzer1-4/+17
2013-05-28radeonsi: Fix hardware state for dual source blendingMichel Dänzer1-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.
2013-05-21radeonsi: Handle TGSI_SEMANTIC_CLIPVERTEXMichel Dänzer1-0/+62
17 more little piglits. NOTE: This is a candidate for the 9.1 branch.
2013-05-21radeonsi: Fix handling of TGSI_SEMANTIC_PSIZEMichel Dänzer1-1/+3
Two more little piglits. NOTE: This is a candidate for the 9.1 branch.
2013-05-21radeonsi: increase array size for shader inputs and outputsMarek Olšák1-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 <maraeo@gmail.com>
2013-04-15radeonsi: Read config values from the .AMDGPU.config ELF sectionTom Stellard1-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 <michel.daenzer@amd.com>
2013-04-15radeon/llvm: Use a struct for storing compiled codeTom Stellard1-18/+17
2013-04-10radeonsi: remove sampler writemask v3Christian König1-12/+7
v2: fix instrinsic name as well v3: LLVM revision incremented as well Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-04-05radeonsi: Add compute support v3Tom Stellard1-45/+54
v2: - Only dump shaders when env variable is set. v3: - Don't emit VGT registers Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com
2013-04-05gallium: PIPE_COMPUTE_CAP_IR_TARGET - allow drivers to specify a processor v2Tom Stellard1-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 <currojerez@riseup.net>
2013-04-02radeonsi: add instance divisor support v3Christian König1-25/+42
v2: reduce key size, don't copy key around to much. v3: remove key size reduction Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-04-02radeonsi: add start instance supportChristian König1-1/+12
This works different than on R600, we need to add the start instance manually. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2013-04-02radeonsi: add instanceid supportChristian König1-3/+32
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2013-03-26radeonsi: add preloading for all samplersChristian König1-12/+45
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2013-03-26radeonsi: add preloading of all constantsChristian König1-16/+51
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>