summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeonsi/si_shader.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-12radeonsi: handle loading doubles as geometry shader inputs.Dave Airlie1-4/+16
This adds the double code to the geometry shader input handling. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Cc: "11.0 11.1" <mesa-stable@lists.freedesktop.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit e307cfa7d9a6c4c44be9d0fb50a113024646029e)
2015-12-12radeonsi: handle doubles in lds load path.Dave Airlie1-0/+8
This handles loading doubles from LDS properly. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Cc: "11.0 11.1" <mesa-stable@lists.fedoraproject.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 8c9e40ac22ce5a60753172a8f95a120d84a3ec4c)
2015-11-29radeonsi/compute: Use the compiler's COMPUTE_PGM_RSRC* register valuesTom Stellard1-0/+2
The compiler has more information and is able to optimize the bits it sets in these registers. Reviewed-by: Marek Olšák <marek.olsak@amd.com> CC: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 89851a296536b89364fe6104d13330975788f960)
2015-11-13radeonsi: remove dead code after ES-GS linkage changeMarek Olšák1-43/+0
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-11-13radeonsi: link ES-GS just like LS-HSMarek Olšák1-19/+5
This reduces the shader key for ES. Use a fixed attrib location based on (semantic name, index). The ESGS item size is determined by the physical index of the highest ES output, so it's almost always larger than before, but I think that shouldn't matter as long as the ESGS ring buffer is large enough. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-17radeonsi: implement vertex color clampingMarek Olšák1-0/+42
This is only supported in the compatibility profile (without GS and tess). Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-17radeonsi: implement fragment color clampingMarek Olšák1-0/+13
using the shader key for now. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-17radeonsi: fix a GS copy shader leakMarek Olšák1-1/+3
Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-17radeonsi: remove an unused ctx parameter in si_shader_destroyMarek Olšák1-2/+2
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-17radeonsi: print export_prim_id from the shader keyMarek Olšák1-0/+2
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-17radeonsi: clean up si_llvm_init_export_argsMarek Olšák1-42/+35
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-03radeonsi: do force_persample_interp in shaders for non-trivial casesMarek Olšák1-1/+52
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-09-24radeonsi: report alloc failure from si_shader_binary_readMarek Olšák1-1/+4
Cc: 11.0 <mesa-stable@lists.freedesktop.org> Acked-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-09-21radeonsi: implement TXQS supportIlia Mirkin1-24/+68
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Fredrik Bruhn <f@unibap.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-09-21radeonsi: load fmask ptr relative to the resources arrayIlia Mirkin1-1/+1
res_ptr already contains the resource values. fmask_ptr needs to be looked up relative to the start of the resource params. Note that this only affects indirect loads of MS sampler arrays. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Cc: "11.0" <mesa-stable@lists.freedesktop.org>
2015-09-10radeonsi: only use new versions of LLVM image and sample intrinsicsMarek Olšák1-283/+186
Just a cleanup I had made a long time ago and forgot about. v2: use tgsi_is_shadow_target Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2015-09-10gallium/radeon: drop support for LLVM 3.4Marek Olšák1-3/+2
This allows using the new tex instrinsics unconditionally. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-29radeonsi: remove no-op 32-bit maskingMarek Olšák1-1/+1
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-26radeonsi: allow si_dump_key to write to a fileMarek Olšák1-18/+18
Acked-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-26radeonsi: mark unreachable paths to avoid warningsGrazvydas Ignotas1-1/+1
Otherwise we get: warning: 'num_user_sgprs' may be used uninitialized in this function ... Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Marek Olšák <marek.olsak@amd.com>
2015-08-19radeonsi: fix a typo as_es -> as_ls in a stringMarek Olšák1-1/+1
Trivial.
2015-08-19radeonsi: fix indirect indexing of MSAA texturesMarek Olšák1-4/+13
FMASK wasn't handled correctly. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-14radeonsi: add VI hardware supportMarek Olšák1-4/+21
2015-08-13radeonsi: add support for gl_PrimitiveID in the fragment shaderMarek Olšák1-3/+19
It must be obtained from the VS. The GS scenario A must be enabled for PrimID to be generated for the VS. + 4 piglits Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-06radeonsi: before storing tess levels, load them from LDS instead of temporaryMarek Olšák1-79/+57
Also use only one store if stride <= 4. All the fetches from and stores to temporaries can be removed now. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91461 Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-31radeonsi: fix broken st/nine from merging tessellationMarek Olšák1-2/+7
st/nine uses GENERIC slots greater than 60.
2015-07-31radeonsi: add a debug flag that disables printing ISA in shader dumpsMarek Olšák1-9/+11
2015-07-31radeonsi: add a debug flag that disables printing TGSI in shader dumpsMarek Olšák1-1/+1
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-07-31radeonsi: add a debug flag that disables printing the LLVM IR in shader dumpsMarek Olšák1-6/+7
This is for shader-db and should reduce size of shader dumps.
2015-07-31radeonsi: store shader disassemblies in memory for future usersMarek Olšák1-2/+7
This will be used by the new ddebug pipe. I'm including it now to avoid conflicts with other patches.
2015-07-31gallium/radeon: remove build_intrinsic and build_tgsi_intrinsicMarek Olšák1-28/+28
duplicated now Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-07-31gallivm: add LLVMAttribute parameter to lp_build_intrinsicMarek Olšák1-8/+8
This will help remove some duplicated code from radeon. Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-07-30radeonsi: add GS multiple streams support (v2)Dave Airlie1-14/+60
This is the final piece for ARB_gpu_shader5, The code is based on the r600 code from Glenn Kennard, and myself. While developing this, I'm not 100% sure of all the calculations made in the GS registers, this is why the max_stream is worked out there and used to limit the changes in registers. Otherwise my initial attempts either regressed GS texelFetch tests or primitive-id-restart. The current code has no regressions in piglit. This commit doesn't enable ARB_gpu_shader5, since that just bumps the glsl level to 4.00, so I'll just do a separate patch for 4.10. v1.1: fix bug introduced in rebase. v2: Address Marek's review comments, remove my llvm stream code for simpler C, move gsvs_ring and gs_next_vertex to arrays. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-28radeonsi: add support for interpolateAt functions (v2)Dave Airlie1-1/+240
This is part of ARB_gpu_shader5, and this passes all the piglit tests currently available. v2: use macros from the fine derivs commit. add comments. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-25radeonsi: add fine derivate control (v2.1)Dave Airlie1-5/+47
This adds support for fine derivatives and enables ARB_derivative_control on radeonsi. (just fell out of my working out interpolation) v2: cleanup some bits, write a comment v2.1: take Michel's comment from the mailing list Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-25radeonsi: fix GLSL textureGrad(samplerCube*) functionsMarek Olšák1-11/+24
+4 piglits Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-25radeonsi: ubo indexing support (v2)Dave Airlie1-3/+12
This is required as part of ARB_gpu_shader5. no backend changes are required for this, or if any are, it's the same ones as for samplers. v2: use get_indirect_index (Marek) Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-25radeonsi: add support for indirect samplers (v2)Dave Airlie1-8/+41
This adds the frontend support, however the llvm backend produces the wrong pattern, however we can conditionalise enabling ARB_gpu_shader5 on whatever version of llvm we fix this in. v2: drop unneeded sampler_indirect checks (Marek) Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-25radeonsi: split out interpolation input selectionDave Airlie1-25/+37
This is prep work for using it in the interpolation code later. Also add storage for the input interpolation mode so we can pick it up later. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-25radeonsi: separate out load sample positionDave Airlie1-18/+26
This is prep work for reusing this in the interpolation code later. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-23radeonsi: add shader code generation for tessellationMarek Olšák1-18/+705
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-23radeonsi: implement TGSI_OPCODE_BARRIERMarek Olšák1-0/+12
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-23radeonsi: rename build_streamout_store -> build_tbuffer_store_dwordsMarek Olšák1-12/+12
It will be reused later. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-23radeonsi: separate primitive ID computationMarek Olšák1-7/+20
Support for new shader stages will be added here. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-23radeonsi: move declaring streamout parameters to its own functionMarek Olšák1-13/+23
It will be reused later. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-23radeonsi: make ES2GS offset sgpr location dynamicMarek Olšák1-3/+3
It will have a different location in the tessellation evaluation shader. Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-23radeonsi: upload shader rodata after updating scratch relocationsMarek Olšák1-22/+27
Cc: 10.5 10.6 <mesa-stable@lists.freedesktop.org> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-23radeonsi: remove redundant parameter in si_shader_binary_readMarek Olšák1-5/+3
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-12radeonsi: ARB_gpu_shader_fp64 + ARB_vertex_attrib_64bit support.Dave Airlie1-4/+27
This adds the translation from TGSI to AMDGPU llvm backend, for the 64-bit opcodes. The backend pretty much handles everything for us fine. There is one patch required for SI DFRAC support, that I know off. [airlied: fixed missing comma, updated relnotes] Reviewed-by: Marek Olšák <marek.olsak@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-07radeonsi: Use param export count from si_llvm_export_vs in si_shader_vsMichel Dänzer1-0/+2
This eliminates the error prone logic in si_shader_vs recalculating this value. It also fixes TGSI_SEMANTIC_CLIPDIST outputs incorrectly not being counted for VS exports. They need to be counted because they are passed to the pixel shader as parameters as well. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91193 Reviewed-by: Marek Olšák <marek.olsak@amd.com>