summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radeonsi: Add debug option to enable LLVM GlobalISel (v2)Tom Stellard2018-07-233-2/+18
| | | | | | | | | | R600_DEBUG=gisel will tell LLVM to use GlobalISel rather than SelectionDAG for instruction selection. v2: mareko: move the helper to src/amd/common Signed-off-by: Marek Olšák <[email protected]> Reviewed-by: Tom Stellard <[email protected]>
* radv: enable VK_KHR_16bit_storage extension / 16bit storage featuresDaniel Schürmann2018-07-233-4/+8
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add support for 16bit load_push_constantDaniel Schürmann2018-07-231-0/+20
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add support for 16bit input/outputDaniel Schürmann2018-07-232-18/+80
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add support for 16bit buffer loadsDaniel Schürmann2018-07-231-40/+55
| | | | | | v2: Fixed dvec3 loads (bas) Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add support for 16bit UBO loadsDaniel Schürmann2018-07-233-3/+51
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add support for 16bit ssbo storesDaniel Schürmann2018-07-231-60/+84
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: add 16bit conversion operationsDaniel Schürmann2018-07-232-9/+31
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: print a big warning when RADV_TRACE_FILE is setSamuel Pitoiset2018-07-231-0/+4
| | | | | | | | Users shouldn't use this debugging option except when we ask them to do! Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix a memleak for merged shaders on GFX9Samuel Pitoiset2018-07-231-1/+1
| | | | | | | | | | modules[i] can be NULL for merged shaders but we have to free the NIR code. radv_can_dump_shader_stats() already handles if modules[i] is NULL, no need to check it twice. Cc: [email protected] Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: don't flush DB before subpass FS resolvesSamuel Pitoiset2018-07-201-2/+1
| | | | | | | That shouldn't be needed because the DB state is invalid. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: simplify a condition in radv_src_access_flush()Samuel Pitoiset2018-07-201-4/+6
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: save current state just before resolving with FSSamuel Pitoiset2018-07-201-5/+5
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: don't check if a subpass has resolve attachments twiceSamuel Pitoiset2018-07-202-24/+0
| | | | | | | We already check that in radv_cmd_buffer_resolve_subpass(). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: make use of radv_subpass_barrier() when resolving subpassesSamuel Pitoiset2018-07-204-15/+20
| | | | | | | | The goal is to use radv_barrier()/radv_subpass_barrier() as much as possible for further optimizations. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/nir: add a workaround for bitfield_extract when count is 0Samuel Pitoiset2018-07-191-3/+17
| | | | | | | | | | | | LLVM 7 returns incorrect results when count is 0, something has been broken since LLVM 6. Of course, the best solution is to fix LLVM but this workaround works as expected for now. Original workaround by Philippe Rebohle. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107276 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix incorrect assumption about ternary operator precedenceDanylo Piliaiev2018-07-191-2/+2
| | | | | Signed-off-by: Danylo Piliaiev <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: run LLVM optimization passes only on the final function after inliningMarek Olšák2018-07-193-0/+14
|
* radv: Enable binning and dfsm by default on Raven.Bas Nieuwenhuizen2018-07-191-2/+4
| | | | | | Seems like it increases performance by 2-3% for some demos and games. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Always set disable zpass increment bit when possible.Bas Nieuwenhuizen2018-07-191-3/+1
| | | | | | When no occlusion queries are active even if out of order is enabled. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Select correct entries for binning.Bas Nieuwenhuizen2018-07-191-2/+2
| | | | | | | Overshot it by one every time. CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Fix number of samples used for binning.Bas Nieuwenhuizen2018-07-191-1/+1
| | | | | | | Used the wrong register ... CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Disable disabled color buffers in rbplus opts.Bas Nieuwenhuizen2018-07-191-1/+8
| | | | | CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: fix wmaybe-uninitialized in radv_meta_fast_clear.cAndres Rodriguez2018-07-181-1/+1
| | | | | | | | | | Assignment and usage of this variable both happen inside an if(rad_image_has_dcc()) {} blocks. It seems gcc plays it safe and assumes that both function calls could have different return values. But in this case we should be safe. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: add support for VK_EXT_conditional_renderingSamuel Pitoiset2018-07-188-1/+111
| | | | | | | Inherited commands buffers are not supported. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add support for non-inverted conditional renderingSamuel Pitoiset2018-07-183-5/+17
| | | | | | | | | | | By default, our internal rendering commands are discarded only if the predicate is non-zero (ie. DRAW_VISIBLE). But VK_EXT_conditional_rendering also allows to discard commands when the predicate is zero, which means we have to use a different flag. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: set the predicate for indirect/indexed draw commandsSamuel Pitoiset2018-07-181-3/+4
| | | | | | | | VK_EXT_conditional_rendering allows to discard draw commands (not only normal draws). Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: set the predicate for dispatch commandsSamuel Pitoiset2018-07-181-3/+4
| | | | | | | VK_EXT_conditional_rendering allows to discard dispatch commands. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unused variable in radv_CreateRenderPass2KHR()Samuel Pitoiset2018-07-181-1/+0
| | | | Signed-off-by: Samuel Pitoiset <[email protected]>
* radv: optimize radv_stage_flush() for pre fragment shader stagesSamuel Pitoiset2018-07-181-5/+5
| | | | | | | | | | We don't need to emit PS_PARTIAL_FLUSH for the pre fragment shader stages (ie. geometry/tessellation). Emitting VS_PARTIAL_FLUSH is enough for these stages. Note that PS_PARTIAL_FLUSH also synchronizes all vertex stages. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/winsys: use alloca() for semaphore dependenciesSamuel Pitoiset2018-07-171-6/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: reduce number of CB/DB meta flushes for VK_ACCESS_TRANSFER_WRITE_BITSamuel Pitoiset2018-07-171-6/+14
| | | | | | | | If we know that the given image doesn't have any metadata, we don't need to flush. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: fix implementation of VK_KHR_create_renderpass2 for multiviewsSamuel Pitoiset2018-07-171-12/+1
| | | | | | | | | | | The Vulkan 1.1.80 spec says: "viewMask has the same effect for the described subpass as VkRenderPassMultiviewCreateInfo::pViewMasks has on each corresponding subpass." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* nir: cleanup oversized arrays in nir_swizzle callsKarol Herbst2018-07-133-12/+7
| | | | | | | | | | There are no fixed sized array arguments in C, those are simply pointers to unsized arrays and as the size is passed in anyway, just rely on that. where possible calls are replaced by nir_channel and nir_channels. Reviewed-by: Jason Ekstrand <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* radeonsi: add support for Vega20Marek Olšák2018-07-127-2/+14
| | | | Reviewed-by: Alex Deucher <[email protected]>
* radv: simplify the logic in radv_set_descriptor_set()Samuel Pitoiset2018-07-121-4/+2
| | | | | | | | | Now that 'set' can't be NULL because the meta operations no longer bind a NULL descriptor, the logic can be simplified a little bit. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove one useless check in radv_bind_descriptor_set()Samuel Pitoiset2018-07-121-2/+1
| | | | | | | 'set' shouldn't be NULL. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/meta: do not restore a NULL descriptorSamuel Pitoiset2018-07-121-4/+3
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unnecessary verification code around ring_offsets_idxSamuel Pitoiset2018-07-122-18/+0
| | | | | | | I don't want to waste CPU cycles for nothing. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: get rid of buffer object prioritiesSamuel Pitoiset2018-07-127-85/+52
| | | | | | | | | We mostly use the same priority for all buffer objects, so I don't think that matter much. This should reduce CPU overhead a little bit. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: emit a dummy ZPASS_DONE to prevent GPU hangs on GFX9Samuel Pitoiset2018-07-125-14/+47
| | | | | | | | | | A ZPASS_DONE or PIXEL_STAT_DUMP_EVENT (of the DB occlusion counters) must immediately precede every timestamp event to prevent a GPU hang on GFX9. Cc: 18.1 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add support for VK_KHR_create_renderpass2Samuel Pitoiset2018-07-123-0/+194
| | | | | | | | VkCreateRenderPass2KHR() is quite similar to VkCreateRenderPass() but refactoring the code is a bit painful. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: introduce radv_subpass_attachment data structureSamuel Pitoiset2018-07-127-31/+44
| | | | | | | Needed for VK_KHR_create_renderpass2. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: make sure to wait for CP DMA when neededSamuel Pitoiset2018-07-113-4/+52
| | | | | | | | | This might fix some synchronization issues. I don't know if that will affect performance but it's required for correctness. CC: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add some cxxflags for new c++ fileDave Airlie2018-07-101-0/+4
| | | | | | | Looks like I broke intel CI compiles. Fixes: 6f3aee40f9 (radv: using tls to store llvm related info and speed up compiles (v10)) Tested-by: Clayton Craft <[email protected]>
* anv,radv: Add support for VK_KHR_get_display_properties2Jason Ekstrand2018-07-092-0/+58
| | | | Reviewed-by: Keith Packard <[email protected]>
* radv: using tls to store llvm related info and speed up compiles (v10)Dave Airlie2018-07-108-28/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This uses the common compiler passes abstraction to help radv avoid fixed cost compiler overheads. This uses a linked list per thread stored in thread local storage, with an entry in the list for each target machine. This should remove all the fixed overheads setup costs of creating the pass manager each time. This takes a demo app time to compile the radv meta shaders on nocache and exit from 1.7s to 1s. It also has been reported to take the startup time of uncached shaders on RoTR from 12m24s to 11m35s (Alex) v2: fix llvm6 build, inline emit function, handle multiple targets in one thread v3: rebase and port onto new structure v4: rename some vars (Bas) v5: drag all code into radv for now, we can refactor it out later for radeonsi if we make it shareable v6: use a bit more C++ in the wrapper v7: logic bugs fixed so it actually runs again. v8: rebase on top of radeonsi changes. v9: drop some C++ headers, cleanup list entry v10: use pop_back (didn't have enough caffeine) Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add the trace BO to the list when starting a new cmdbufSamuel Pitoiset2018-07-091-4/+7
| | | | | | | | That might reduce CPU overhead a little bit when using RADV_TRACE_FILE. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: reduce CPU overhead in radv_flush_descriptors()Samuel Pitoiset2018-07-093-11/+8
| | | | | | | | The number of enabled descriptors for a given pipeline stage can be computed at compile time. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: winsys/amdgpu: include missing pthread.h headerMauro Rossi2018-07-071-0/+1
| | | | | | | | | | | | | | | | | | pthread types are used in some files without explicitely including pthread.h. This leads to compile errors on Android 7.x nougat-x86 e.g. in src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h In file included from external/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c:31: In file included from external/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.h:32: external/mesa/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h:52:2: error: unknown type name 'pthread_mutex_t' pthread_mutex_t global_bo_list_lock; ^ 1 error generated. Including pthread.h explicitely solves the building error Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>