summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: fix adjusting vertex fetches since 16bit supportSamuel Pitoiset2018-07-261-3/+4
| | | | | | | | | | | Move the integer conversion after the fixup. This fixes some regressions with dEQP-VK.pipeline.vertex_input.single_attribute.mat4.as_a2r10g10b10* Fixes: b722b29f10 ("radv: add support for 16bit input/output") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac: fix typo DSL_SEL -> DST_SELMarek Olšák2018-07-262-4/+4
|
* nir: rename f2f16_undef to f2f16Karol Herbst2018-07-241-1/+1
| | | | | | | | | | | we need rounding modes on other conversions involving floats and it is easier to rename f2f16_undef than renaming all the other ones. v2: rebased on master Reviewed-by: Jason Ekstrand <[email protected]> Acked-by: Rob Clark <[email protected]> Signed-off-by: Karol Herbst <[email protected]>
* python: Use range() instead of xrange()Mathieu Bridon2018-07-241-1/+1
| | | | | | | | | | | | | | | | Python 2 has a range() function which returns a list, and an xrange() one which returns an iterator. Python 3 lost the function returning a list, and renamed the function returning an iterator as range(). As a result, using range() makes the scripts compatible with both Python versions 2 and 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* python: Better iterate over dictionariesMathieu Bridon2018-07-241-1/+1
| | | | | | | | | | | | | | | | In Python 2, dictionaries have 2 sets of methods to iterate over their keys and values: keys()/values()/items() and iterkeys()/itervalues()/iteritems(). The former return lists while the latter return iterators. Python 3 dropped the method which return lists, and renamed the methods returning iterators to keys()/values()/items(). Using those names makes the scripts compatible with both Python 2 and 3. Signed-off-by: Mathieu Bridon <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* radv: Still enable inmemory & API level caching if disk cache is not enabled.Bas Nieuwenhuizen2018-07-241-2/+1
| | | | | | | | That we don't have a background disk cache does not mean we should prevent the app caching anything. CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* 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]>