summaryrefslogtreecommitdiffstats
path: root/src/amd/common
Commit message (Collapse)AuthorAgeFilesLines
* ac/llvm: use min+max instead of AMDGPU.clamp on LLVM 5.0Marek Olšák2017-02-181-0/+17
| | | | | | | It selects v_med3_f32, which has the same rate & size. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: stop using TGSI_OPCODE_CLAMP by moving it amd/commonMarek Olšák2017-02-182-0/+16
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* ac/llvm: fix various findMSB bugsMarek Olšák2017-02-181-2/+3
| | | | | | sffbh needs to be suffixed with ".i32" Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: use shared umsb helper.Dave Airlie2017-02-161-17/+1
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: add emit umsb shared code.Dave Airlie2017-02-162-0/+29
| | | | | | | | Since we shared imsb, makes sense to share umsb. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: use llvm.amdgcn.sffbh intrinsic instead of AMDGPU.flbit.i32Dave Airlie2017-02-161-1/+2
| | | | | | | | Use the newer intrinsic. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use shader imsb emission code.Dave Airlie2017-02-161-17/+1
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: add ac_emit_imsb helper.Dave Airlie2017-02-162-0/+28
| | | | | | | | | We want to use a different intrinsic on newer llvm, so move this code to a shared area. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix warning since using common gs emit codeDave Airlie2017-02-141-1/+0
| | | | Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use sendmsg emission interface.Dave Airlie2017-02-141-26/+4
| | | | | | | This uses the common code to emit the correct intrinsic. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac/llvm: add support for sendmsg emissionDave Airlie2017-02-142-0/+25
| | | | | | | | | This lets us use the new intrinsic on the correct version of llvm. Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use common interp code for new intrinsicsDave Airlie2017-02-141-20/+41
| | | | | | | | This uses the common fs interp code to use the new llvm intrinsics so llvm can drop the old ones. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: avoid the fmask path when doing txs.Dave Airlie2017-02-061-1/+2
| | | | | | | | This fixes the vulkan samples deferredmultisampling test. Cc: "17.0" <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeon/ac: move common llvm build functions to a separate file.Dave Airlie2017-02-075-851/+931
| | | | | | | | | Suggested by Marek. Reviewed-by: Marek Olšák <[email protected]> Acked-by: Nicolai Hähnle <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix shared memory load/stores.Dave Airlie2017-02-031-0/+7
| | | | | | | | | | | If we have an indirect index here we need to scale it by attribute slots e.g. is this is vec2[256] then we get an indir_index in the 0.255 range but the vec2 are aligned inside vec4 slots. So scale the indir index, then extract the channels. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: correctly size shared memory usage.Dave Airlie2017-02-031-1/+1
| | | | | | | | | | We count the number of slots used, but slots are vec4 sized, so we have to scale by 16 not 4. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix compute shared memory stores since 64-bit.Dave Airlie2017-02-031-1/+3
| | | | | | | | | | | These regressed and caused doom to stop loading. Fixes: 03724af26 radv/ac: Implement Float64 load/store var. Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: move to using shared emit_ddxy code.Dave Airlie2017-02-031-68/+7
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move most of emit_ddxy to shared code.Dave Airlie2017-02-032-0/+86
| | | | | | | | We can reuse this in radv. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: use shared thread id codeDave Airlie2017-02-031-42/+2
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move get thread id to shared code.Dave Airlie2017-02-032-1/+53
| | | | | | | | radv will use this. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: migrate to using shared code for some load/store stuff.Dave Airlie2017-02-031-103/+28
| | | | | | | | This migrates to the code shared with radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move tbuffer store and buffer load to shared code.Dave Airlie2017-02-032-1/+198
| | | | | | | | These are all reuseable by radv. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move a bunch of load/store related things to common code.Dave Airlie2017-02-032-0/+87
| | | | | | | | | These are all shareable with radv, so start migrating them to the common code. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle clip/cull distance sizing in geometry shader outputsDave Airlie2017-02-021-8/+10
| | | | | | | | | | | Otherwise we were writing these as 4 components, and things went bad. Fixes (the remaining): dEQP-VK.clipping.user_defined.*.vert_geom.* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: add const_index to fetch index for gs inputsDave Airlie2017-02-021-1/+1
| | | | | | | | | | | | This fixes clip distance fetches as they are single item loads with a const_index like float[1]. Fixes: dEQP-VK.clipping.user_defined.*.vert_geom.[0-6] Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radeonsi/ac: move frag interp emission code to shared llvm code.Dave Airlie2017-02-022-0/+85
| | | | | | | | This code should be used in radv, so move it to a shared location in advance of doing that. Reviewed-by: Nicolai Hähnle <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: Add draw index support.Bas Nieuwenhuizen2017-02-011-2/+8
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* radv/ac: Implement Float64 SSBO loads.Bas Nieuwenhuizen2017-02-011-26/+49
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: Implement Float64 UBO loads.Bas Nieuwenhuizen2017-02-011-2/+6
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: Implement Float64 load/store var.Bas Nieuwenhuizen2017-02-011-53/+48
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: Implement Float64 SSBO stores.Bas Nieuwenhuizen2017-02-011-3/+14
| | | | | | | No f16 support as I'm not quite sure about alignment yet. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: Add core Float64 support.Bas Nieuwenhuizen2017-02-011-44/+129
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/ac: apply slice rounding to 1d arrays as well.Dave Airlie2017-01-311-5/+15
| | | | | | | | | Fixes: dEQP-VK.glsl.texture_functions.texture.*1darray* Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.0" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: handle layer export from vs->fs properlyDave Airlie2017-01-312-2/+9
| | | | | | | | Fixes: dEQP-VK.geometry.layered.1d_array.fragment_layer Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle primitive idDave Airlie2017-01-312-1/+11
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle emitting vertex outputs to esgs ring.Dave Airlie2017-01-312-1/+38
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle gs inputsDave Airlie2017-01-311-0/+56
| | | | | | | | This handles geometry shader inputs written by the vertex (es) shader to the esgs ring. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: add geom input support to get deref offset.Dave Airlie2017-01-311-8/+14
| | | | | | | This just adds the API and fixes up the callers. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle invocation and primitive id intrinsicsDave Airlie2017-01-311-0/+9
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle geometry emit vertex and end prim intrinsics.Dave Airlie2017-01-311-0/+126
| | | | | | | | This handles emitting things to the gsvs ring, and sending the correct GS msgs. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle emitting gs epilogueDave Airlie2017-01-311-0/+14
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: add copy shader creationDave Airlie2017-01-312-0/+88
| | | | | | | This create the gs copy shader and compiles it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: setup function parameters for vs as es and copy shader.Dave Airlie2017-01-311-17/+32
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: pass some necessary gs info back to state handling.Dave Airlie2017-01-312-0/+7
| | | | | | | We need this info to program some registers. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: propogate as_es flag into shader info from key.Dave Airlie2017-01-312-0/+4
| | | | | | | | This just places the flag into the shader info so we can use it from the driver after we create the shader. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: start setting up the geom shader rings (v2)Dave Airlie2017-01-312-3/+63
| | | | | | | | | This sets up the rings and adds the variables needed to make them work. v2: rework for sharing ring and scratch Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: handle geom shader sgpr/vgpr inputsDave Airlie2017-01-312-0/+41
| | | | | | | This just sets up the gpr inputs. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: add geom shader sendmsg defines.Dave Airlie2017-01-311-0/+8
| | | | | | | This just adds some defines needed for geom shaders. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/ac: add some geom shader info from nir->ac shader.Dave Airlie2017-01-312-0/+12
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>