aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radeon/ac: move common llvm build functions to a separate file.Dave Airlie2017-02-076-851/+933
| | | | | | | | | 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]>
* android: fix llvm, elf dependencies for M, N releasesMauro Rossi2017-02-011-1/+1
| | | | | | | | These changes set the correct llvm version and elf include path which differ for Marshmallow and Nougat Cc: "17.0" <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* radv: handle VK_QUEUE_FAMILY_IGNORED in image transitions (v3)Dave Airlie2017-02-024-12/+15
| | | | | | | | | | | | | The CTS tests at least are using this, and we were totally ignoring it. This hopefully fixes the bouncing multisample CTS tests. v2: get family mask in ignored case from command buffer. v3: only change things in one place, use logic from Bas. Reviewed-by: Bas Nieuwenhuizen <[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: Enable VK_KHR_shader_draw_parameters.Bas Nieuwenhuizen2017-02-012-0/+5
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Edward O'Callaghan <[email protected]>
* radv: Pass draw index to shader.Bas Nieuwenhuizen2017-02-011-5/+9
| | | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Edward O'Callaghan <[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: Enable Float64 support.Bas Nieuwenhuizen2017-02-012-1/+2
| | | | | Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[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/geom: check if esgs and gsvs ring exists before filling geom ringsDave Airlie2017-01-311-3/+6
| | | | | | | | | | | There are some corner cases where you end up with an esgs ring, but no gsvs ring, test for both before dereferencing. Fixes: dEQP-VK.geometry.emit.points_emit_0_end_0 Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: enable geometryShader and multiViewport capabilities.Dave Airlie2017-01-311-2/+2
| | | | | | | This enables geometry shader support on radv. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: handle layer export from vs->fs properlyDave Airlie2017-01-313-2/+23
| | | | | | | | Fixes: dEQP-VK.geometry.layered.1d_array.fragment_layer Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: emit esgs itemsize register.Dave Airlie2017-01-311-0/+2
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: handle prim id inputs to fragment shader.Dave Airlie2017-01-311-1/+15
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: emit geometry shaders to hardwareDave Airlie2017-01-311-2/+96
| | | | | | | This emits the compiled geometry shader and other state registers. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: emit geometry ring size and pointers via preamble (v2)Dave Airlie2017-01-313-11/+230
| | | | | | | | | | | | This uses the scratch infrastructure to handle the esgs and gsvs rings. (this replaces the old code that did this with patching). v2: fix correct ring sizes, reset sizes (Bas) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add gs ring size calculations to pipeline.Dave Airlie2017-01-312-0/+34
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add pipeline creation support for geometry shaders (v2.1)Dave Airlie2017-01-313-8/+124
| | | | | | | | | | | This adds gs copy shader support to the pipeline cache, and few geometry related changes. v2: rebase for spill changes. v2.1: fix incorrect pipeline destruction. 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: emit vertex shader to correct hw block.Dave Airlie2017-01-311-1/+20
| | | | | | | This emits the shader to the ES block in the correct case. 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: extend shader stage code to cover geometry shaders.Dave Airlie2017-01-311-8/+22
| | | | | | | This enables the paths for setting up user ptrs to vs/es and gs. 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]>