aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* radv: fix regression with builtin cacheTimothy Arceri2020-05-301-1/+1
| | | | | | | | | | | If the ~/.cache dir already exists continue on without failing. Fixes: cd61f5234d2c ("radv: Handle failing to create .cache dir.") Tested-by: Dieter Nützel <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5249>
* radv/aco: enable VK_KHR_subgroup_extended_types on GFX8+Samuel Pitoiset2020-05-292-2/+2
| | | | | | | | Should be working now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5148>
* radv/aco: enable VK_EXT_subgroup_size_controlSamuel Pitoiset2020-05-291-1/+1
| | | | | | | | | | ACO should already support Wave32 on GFX10 with all shader stages and CTS pass. RADV currently only allows Wave32 with the compute shader stage. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5056>
* spirv,radv,anv: implement no-op VK_GOOGLE_user_typeSamuel Pitoiset2020-05-281-0/+1
| | | | | | | | | | | | | | This extension only allows HLSL shader compilers to optionally embed unambiguous type information which can be safely ignored by the driver. This fixes a crash with the recent Vulkan backend of Path Of Exile (it uses the extension without checking if it's supported). Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Tested-by: Edmondo Tommasina <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5237>
* amd: replace SH -> SA (shader array) in commentsMarek Olšák2020-05-261-2/+2
| | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>
* ac/gpu_info: replace num_good_cu_per_sh with min/max_good_cu_per_saMarek Olšák2020-05-263-3/+3
| | | | | | | Perf counters use the new max number. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5184>
* radv: Implement vkGetSwapchainGrallocUsage2ANDROID.Bas Nieuwenhuizen2020-05-251-0/+89
| | | | | | | | | | | | | | | | | | | | | This was implemented in version 6 of the VK_ANDROID_native_buffer extension and we only implement version 5. However, the Android Vulkan loader only checks whether vkGetInstanceProcAddr for the function is not NULL. This all went wrong when we switched to the layer code from ANV. Because the function may now be different per device, it adds fallback functions that dispatch to the dispatch table. So if we didn't implement the function we still returned a pointer to the dispatch function, which made the Android Vulkan loader believe it was supported. Dispatch functions: https://gitlab.freedesktop.org/mesa/mesa/-/blob/d555794f3032594dbef3623052103900138d2356/src/amd/vulkan/radv_entrypoints_gen.py#L328 Fixes: d555794f303 "radv: update entrypoints generation from ANV" Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2936 Acked-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5198>
* radv: Do not close fd -1 when NULL-winsys creation fails.Bas Nieuwenhuizen2020-05-251-1/+2
| | | | | | Fixes: cd6ec2b1abb "radv: implement a dummy winsys for creating devices without AMDGPU" Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>
* radv: Remove dead code.Bas Nieuwenhuizen2020-05-251-11/+2
| | | | | | | | pool is always non-NULL, and is also accessed before this check in the function, so remove the pool = NULL case. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>
* radv: Handle failing to create .cache dir.Bas Nieuwenhuizen2020-05-251-1/+2
| | | | | | Fixes: f4e499ec791 "radv: add initial non-conformant radv vulkan driver" Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>
* radv/winsys: Remove extra sizeof multiply.Bas Nieuwenhuizen2020-05-251-1/+1
| | | | | | | | The pointer is already uint64_t*, so the sizeof was too much ... Fixes: eeff7e11544 "radv: Add userspace fence buffer per context." Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5181>
* radv: advertise VK_AMD_texture_gather_bias_lodSamuel Pitoiset2020-05-252-0/+2
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147>
* radv: add support for querying which formats support texture gather LODSamuel Pitoiset2020-05-251-0/+12
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5147>
* radv: advertise shaderDeviceClock on GFX8+Samuel Pitoiset2020-05-241-1/+1
| | | | | | | | Unsupported on GFX6-GFX7. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5117>
* radv: remove useless assignment in build_streamout_vertex()Samuel Pitoiset2020-05-241-2/+1
| | | | | | | Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3025 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5158>
* radv: cleanup physical device featuresSamuel Pitoiset2020-05-241-117/+144
| | | | | | | | Similar to the physical device properties. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5116>
* radv: do not return from radv_GetPhysicalDeviceFeatures2()Samuel Pitoiset2020-05-241-1/+1
| | | | | | | | This function returns void. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5116>
* ac: update register and packet definitions for preemptionMarek Olšák2020-05-234-10/+10
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5095>
* radv/winsys: remove useless free in radv_amdgpu_create_bo_list()Samuel Pitoiset2020-05-211-3/+1
| | | | | | | | | free(NULL) is fine but let's remove it. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3008 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5131>
* radv: fix duplicated expression in ac_setup_rings()Samuel Pitoiset2020-05-211-1/+1
| | | | | | | | | | Probably a search&replace mistake when that common struct was introduced. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3006 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5130>
* radv: fix missing break in radv_GetPhysicalDeviceFeatures2()Samuel Pitoiset2020-05-211-0/+1
| | | | | | | | | | Wow, missed that one. Fixes: 57e796a12a8 - ("radv: Implement VK_EXT_custom_border_color") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5128>
* radv/winsys: Finish mapping for sparse residency.Bas Nieuwenhuizen2020-05-191-21/+42
| | | | | | | | This adds the part that disables pagefaults when unbacked sparse textures get accessed. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5079>
* radv: Expose VK_EXT_pipeline_creation_cache_control.Bas Nieuwenhuizen2020-05-192-0/+7
| | | | | | Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2972 Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5072>
* radv: Support VK_PIPELINE_CACHE_CREATE_EXTERNALLY_SYNCHRONIZED_BIT_EXT.Bas Nieuwenhuizen2020-05-192-18/+39
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5072>
* radv: Support VK_PIPELINE_CREATE_EARLY_RETURN_ON_FAILURE_BIT_EXT.Bas Nieuwenhuizen2020-05-191-0/+12
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5072>
* radv: Support VK_PIPELINE_COMPILE_REQUIRED_EXT.Bas Nieuwenhuizen2020-05-193-12/+32
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5072>
* radv/aco: enable storageInputOutput16 on GFX9+Samuel Pitoiset2020-05-191-2/+2
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4966>
* radv: fix missing break in radv_GetPhysicalDeviceProperties2()Samuel Pitoiset2020-05-191-0/+1
| | | | | | | Fixes: 57e796a12a8 ("radv: Implement VK_EXT_custom_border_color") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5097>
* Revert "ac,radeonsi: fix compilations issues with LLVM 11"Michel Dänzer2020-05-191-1/+1
| | | | | | | | | | This reverts commit 42b1696ef627a5bfee29911a780fa0a4dbf04610. The corresponding LLVM changes were reverted. Acked-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5087>
* radv: use util_float_to_half_rtzChristopher Egert2020-05-171-1/+1
| | | | | | | | | | | | | | | Since commit 8b8af6d398a94cb07015c695fdfdb5c157aa72cf there is a performance regression in dirt 4 on picasso APUs. The game ends up feeding a large value into this which overflows on the conversion to 16bit float. With the old implementation (which now lives in util_float_to_half_rtz) it would be clamped to inf-1, while the new one returns inf. This causes a performance hit somehow at some point down the line. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Fixes: 8b8af6d398a "gallium/util: Switch util_float_to_half to _mesa_float_to_half()'s impl." Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5062>
* radv: Implement VK_EXT_custom_border_colorJoshua Ashton2020-05-154-2/+159
| | | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4877>
* radv: Provide a better error for permission issues with priorities.Bas Nieuwenhuizen2020-05-154-16/+29
| | | | | | Cc: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4816>
* radv: enable shaderResourceMinLodSamuel Pitoiset2020-05-142-0/+2
| | | | | | | | This feature was missing for unknown reasons. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4989>
* radv: add a LLVM version string workaround for SotTR and ACOSamuel Pitoiset2020-05-131-3/+22
| | | | | | | | | | | | | When the LLVM version is too old or missing, SotTR applies shader workarounds and that reduces performance by 2-5% with ACO. SotTR workarounds are applied with LLVM 8 and older, so reporting LLVM 9.0.1 should be fine. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Edmondo Tommasina <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4984>
* radv: use the common code for generating extensions and dispatch tablesSamuel Pitoiset2020-05-132-348/+13
| | | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Lionel Landwerlin <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4987>
* radv: implement VK_EXT_private_dataSamuel Pitoiset2020-05-132-0/+52
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4886>
* radv: use the base object struct typesSamuel Pitoiset2020-05-1312-7/+138
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4886>
* radv: use the common base object type for VkDeviceSamuel Pitoiset2020-05-1312-90/+87
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4886>
* radv: update the list of allowed Android extensionsSamuel Pitoiset2020-05-121-0/+13
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4985>
* radv: handle different Vulkan API versions correctlySamuel Pitoiset2020-05-121-12/+43
| | | | | | | | Loosely based on ANV. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4985>
* radv: limit the Vulkan version to 1.1 for AndroidSamuel Pitoiset2020-05-121-2/+7
| | | | | | | | | | | Vulkan 1.2 seems rejected. This hardcodes the Android version to 1.1.107. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2936 Fixes: 7f5462e349a ("radv: enable Vulkan 1.2") Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4985>
* radv: report correct backend IR in hang reports when ACO is usedSamuel Pitoiset2020-05-081-1/+3
| | | | | | | | | Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4911>
* radv: do not print the LLVM version string twice in hang reportsSamuel Pitoiset2020-05-081-2/+1
| | | | | | | | | | It's already part of the device name, and it should now also correctly report when ACO is used. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4911>
* radv: remove the LLVM version string when ACO is usedSamuel Pitoiset2020-05-081-4/+5
| | | | | | | | | | | | | | | | | | | | | Now that ACO supports all shader stages (the only exception is NGG GS on Navi10 but it fallbacks to legacy GS) it makes sense to remove the LLVM version string reported as part of the device name. The LLVM version string was added in the past for some Feral games to workaround LLVM issues by detecting the version. With ACO, this is unecessary because the Mesa version is enough to eventually enable specific shader workarounds. When the LLVM version string is missing, it is assumed that an old LLVM is used and workarounds are automatically applied. The only Vulkan games that might be affected is Shadow of The Tomb Raider but the impact should be fairly small. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Daniel Schürmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4911>
* amd: unify code for overriding offset and stride for imported buffersMarek Olšák2020-05-071-21/+3
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* amd: assume HTILE is always rb/pipe_aligned, remove ac_surface.u.gfx9.htileMarek Olšák2020-05-072-8/+10
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* amd: assume CMASK is always rb/pipe_aligned, remove ac_surface.u.gfx9.cmaskMarek Olšák2020-05-072-10/+12
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* amd: remove duplicated definitions from amdgpu_drm.hMarek Olšák2020-05-071-3/+0
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4863>
* radv/winsys: do not count visible VRAM buffers twice in the budgetSamuel Pitoiset2020-05-062-17/+33
| | | | | | | | | | | | | | | | | The VRAM size returned to apps is computed as follows: vram_size = real_hw_vram_size - visible_vram_size. Visible VRAM buffers should be counted only in the visible VRAM counter and not twice. Buffers with the NO_CPU_ACCESS flag are known to not be mappable, so they are counted in the VRAM counter. Other buffers, with the CPU_ACCESS flag, or without any of both (imported buffers) are counted in the visible VRAM counter because they are mappable. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4834>
* radv: display an error message if the winsys init failedSamuel Pitoiset2020-05-061-1/+2
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4806>