summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* ac/nir: remove another unused variableGrazvydas Ignotas2017-06-081-1/+0
| | | | | | | Declared by each loop already. Trivial. Signed-off-by: Grazvydas Ignotas <[email protected]>
* radv/meta: remove an unused variableGrazvydas Ignotas2017-06-081-1/+0
| | | | | | | Trivial. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: convert several ifs to a switchGrazvydas Ignotas2017-06-081-9/+11
| | | | | | | | Also solve "outinfo may be used uninitialized" warning by putting in an unreachable(). Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: mark some arguments constGrazvydas Ignotas2017-06-081-30/+31
| | | | | | | | | Most functions are only inspecting nir, so nir related arguments can be marked const. Some more can be done if/when some nir changes are accepted. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: move gpr counting inside argument handling.Dave Airlie2017-06-071-10/+12
| | | | | | | This just moves this code in here to it's cleaner. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: assign argument param pointers in one place.Dave Airlie2017-06-071-187/+152
| | | | | | | | | Instead of having the fragile code to do a second pass, just give the pointers you want params in to the initial code, then call a later pass to assign them. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* ac/nir: consolidate setting userdata locationDave Airlie2017-06-071-28/+17
| | | | | | | | Just pass a pointer and increment inside the function, makes the code less error prone. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move chip_class extraction down further.Dave Airlie2017-06-071-1/+2
| | | | | | | | This seems to matter here in a profile, without this we spend a lot more time exiting this function with no flush bits. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move lots of index related things into the bind.Dave Airlie2017-06-072-19/+14
| | | | | | | | This just moves lots of stuff to the bind stage rather than dealing with it in the draw stage. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: move calculating the vertex sgpr to the pipeline.Dave Airlie2017-06-073-41/+34
| | | | | | | There is no need to calculate this at draw time. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: rename and make global some functions.Dave Airlie2017-06-072-12/+17
| | | | | | | I want to use these in the pipeline setup stage. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* tree-wide: remove trailing backslashEric Engestrom2017-06-071-1/+1
| | | | | | | | | Simple search for a backslash followed by two newlines. If one of the newlines were to be removed, this would cause issues, so let's just remove these trailing backslashes. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radv/gfx9: use correct register setting for uconfig regsDave Airlie2017-06-071-4/+4
| | | | | | Thanks to Marek for pointing this out. Signed-off-by: Dave Airlie <[email protected]>
* radv: Remove SI num RB override for occlusion queries.Bas Nieuwenhuizen2017-06-061-3/+0
| | | | | | | | radeonsi doesn't have it anymore either. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Dave Airlie <[email protected]>
* radv: Split out updating the vertex descriptors.Bas Nieuwenhuizen2017-06-061-11/+18
| | | | | | | Simple refactor. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Move pipeline stuff from flush_state to emit_graphics_pipeline.Bas Nieuwenhuizen2017-06-061-11/+10
| | | | | | | No functional changes. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Add early exit for cache flushes.Bas Nieuwenhuizen2017-06-061-2/+4
| | | | | | | | No sense checking each bit separately in the common case of none being set. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Remove vertex_descriptors_dirty.Bas Nieuwenhuizen2017-06-062-4/+1
| | | | | | | Redundant. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Don't use a divide by index_size.Bas Nieuwenhuizen2017-06-061-3/+8
| | | | | | | Divides are pretty slow, and this is in the hot path of a draw. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv/vulkan: Move radv_get_driver_version to src/vulkan/utilAlex Smith2017-06-061-23/+1
| | | | | | | | | | | | This means it can be reused for other Vulkan drivers. Also fix up a typo, need to search for '.' in the version string rather than ','. v2: Remove unneeded temporary version variable (Emil, Eric) Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* util/vulkan: Move Vulkan utilities to src/vulkan/utilAlex Smith2017-06-064-4/+5
| | | | | | | | | | | | | We have Vulkan utilities in both src/util and src/vulkan/util. The latter seems a more appropriate place for Vulkan-specific things, so move them there. v2: Android build system changes (from Tapani Pälli) Signed-off-by: Alex Smith <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Acked-by: Jason Ekstrand <[email protected]>
* radv: expose integrated device type for APUs.Dave Airlie2017-06-061-1/+1
| | | | | | | | This just sets the vulkan device type depending on whether this is an APU or GPU. Signed-off-by: Dave Airlie <[email protected]> Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver"
* ac/surface: Fix HTILE for radv.Bas Nieuwenhuizen2017-06-061-2/+1
| | | | | | | We always compute HTILE size using addrlib, even when not TC compatible. Signed-off-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Dave Airlied <[email protected]>
* radv: fix write event eop on vega.Dave Airlie2017-06-061-1/+1
| | | | Typo here, fixes command submission hangs on vega
* radv: enable GFX9 on radvDave Airlie2017-06-061-2/+4
| | | | | | | | I'm open to reverting this closer to release if bad things happen, but it might be easier to debugging to leave it for now. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: turn off geom/tess for gfx9.Dave Airlie2017-06-061-4/+4
| | | | | | | We don't support these yet, and it'll take a bit of work to do so. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: misc GFX9 changes.Dave Airlie2017-06-063-6/+21
| | | | | | | These are just some register changes ported from radeonsi for gfx9. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add some GFX9 specific events.Dave Airlie2017-06-061-0/+16
| | | | | | | | These are ported from radeonsi, don't know all the rules for when they should be inserted. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add IA_MULTI_VGT_PARAM support for GFX9.Dave Airlie2017-06-063-5/+16
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add rb+ support for GFX9Dave Airlie2017-06-065-1/+22
| | | | | | | | This adds some rb+ support, as on GFX9 we have to disable it as per radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add GFX9 cache flushing support.Dave Airlie2017-06-064-51/+145
| | | | | | | | | GFX9 needs to write event EOP to a fence buffer, allocate some space for this, and just write an ever increasing number to it, this isn't exactly what radeonsi does, but it seems to work. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add texture descriptor/fmask/cmask support for GFX9Dave Airlie2017-06-061-31/+158
| | | | | | | | This adds gfx9 support for the texture descriptor along with the fmask/cmask allocation routines. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add GFX9 to initialisation cmd buffer.Dave Airlie2017-06-062-16/+61
| | | | | | | | This just adds support for initialising some GFX9 registers, and handles the different init for the VGT reuse reg. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't setup raster_config on gfx9.Dave Airlie2017-06-061-12/+16
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add gfx9 cp dma support.Dave Airlie2017-06-061-5/+16
| | | | | | | | This adds support to the CP dma code for GFX9, ported from radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add gfx9 depth/stencil surface support.Dave Airlie2017-06-063-15/+74
| | | | | | | This is ported from radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add GFX9 support for color surfaces.Dave Airlie2017-06-063-16/+69
| | | | | | | This is ported from radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: add some misc gfx9 pieces.Dave Airlie2017-06-066-0/+13
| | | | | | | | This just adds the strings and includes the gfx9 register defs in some files that we need them in. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: set offchip hs param like radeonsi.Dave Airlie2017-06-061-3/+1
| | | | | | | radeonsi never uses 512 here anymore. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: fix typo in comment.Dave Airlie2017-06-061-1/+1
|
* radv: add a comment from radeonsi before cp dma function.Dave Airlie2017-06-061-0/+4
| | | | | | This is just copied over. Signed-off-by: Dave Airlie <[email protected]>
* radv: remove doubled up prototype.Dave Airlie2017-06-061-4/+0
| | | | Must have snuck in during a rebase.
* radv: split metadata struct into legacy/gfx9 parts.Dave Airlie2017-06-063-41/+58
| | | | | | | This is just ported from radeonsi. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: refactor some texture descriptor state.Dave Airlie2017-06-061-9/+17
| | | | | | | | This just splits out some non-gfx9 bits in advance to avoid regressions. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: refactor color surface init before gfx9.Dave Airlie2017-06-061-25/+35
| | | | | | | This just moves the code around in preparation for gfx9 support. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: refactor depth/stencil state setupDave Airlie2017-06-061-57/+62
| | | | | | | | In advance of GFX9 to reduce chances for regression, refactor this code out so adding the GFX9 changes will be more obvious. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use radv_foreach_stage in a couple of places.Dave Airlie2017-06-061-46/+12
| | | | | | | | This just collapses a few per-stage things into a loop, shouldn't affect anything. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use ac_compute_surfaceNicolai Hähnle2017-06-051-386/+6
| | | | Reviewed-by: Dave Airlie <[email protected]>
* radv: prepare fmask surface creationDave Airlie2017-06-052-7/+7
| | | | | | | | | | | | | | | | | The old code copied over all the surface info from the image surface, we only want some bits of it, and to modify the flags. This prevents a regression in dEQP-VK.api.copy_and_blit.resolve_image.* and others in the subsequent switch to ac_compute_surface. v2: - also disable opt4Space in radv_amdgpu_surface, so that we can apply this patch separately *before* switching to ac_compute_surface and hopefully avoid intermittent regressions (Nicolai) Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Signed-off-by: Nicolai Hähnle <[email protected]>
* radv: use amdgpu_addr_createNicolai Hähnle2017-06-054-158/+5
| | | | Reviewed-by: Dave Airlie <[email protected]>