aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan
Commit message (Collapse)AuthorAgeFilesLines
* ac: add ac_choose_spi_color_formats() to common codeSamuel Pitoiset2020-06-151-112/+13
| | | | | | | | It's similar between RADV and RadeonSI. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5436>
* radv: update internal referenceErik Faye-Lund2020-06-131-1/+1
| | | | Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4630>
* radv/llvm: implement radv_enable_mrt_output_nan_fixup workaroundSamuel Pitoiset2020-06-121-0/+24
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359>
* radv: add new drirc option radv_enable_mrt_output_nan_fixupSamuel Pitoiset2020-06-124-0/+12
| | | | | | | | To replace NaN from FS with zeros to fix game bugs. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5359>
* radv: set DB_SHADER_CONTROL.CONSERVATIVE_Z_EXPORT correctlySamuel Pitoiset2020-06-123-0/+9
| | | | | | | | | Use the SPIR-V execution modes if set. Cc: 20.1 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5404>
* ac/surface: add a wrapper structure to hold ADDR_HANDLEMarek Olšák2020-06-103-5/+3
| | | | | | | and more things in the future. Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5398>
* radv/aco: enable shaderInt8 and VK_KHR_shader_float16_int8 on GFX6-GFX7Samuel Pitoiset2020-06-093-5/+3
| | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* radv/aco: enable shaderInt16 on GFX6-GFX7Samuel Pitoiset2020-06-092-5/+5
| | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* radv/aco: enable 8-bit/16-bit storage on GFX6-GFX7Samuel Pitoiset2020-06-093-10/+10
| | | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Reviewed-by: Rhys Perry <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5226>
* ac: align num_vgprs for gfx10.3Marek Olšák2020-06-091-1/+2
| | | | | Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5383>
* radv/llvm: expose VK_EXT_shader_demote_to_helper_invocation with LLVM 9+Samuel Pitoiset2020-06-093-3/+3
| | | | | | | | It should already work with the LLVM backend. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5361>
* ac/gpu_info, radv: set max_wave64_per_simd to 20 on GFX10Rhys Perry2020-06-081-2/+6
| | | | | | | | | Fixes RADV max_waves reporting for GFX10 Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5356>
* Switch from cElementTree to ElementTree.Vinson Lee2020-06-051-1/+1
| | | | | | | | | | | | | | The xml.etree.cElementTree module will be removed in Python 3.9. Since Python 3.3 the xml.etree.cElementTree module has been deprecated, the xml.etree.ElementTree module uses a fast implementation whenever available. Builds using Python 2.7 can still work but with the slower implementation. Signed-off-by: Vinson Lee <[email protected]> Acked-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5349>
* radv: set keep_statistic_info with RADV_DEBUG=shaderstatsRhys Perry2020-06-051-1/+3
| | | | | | | | | Needed for RADV_DEBUG=shaderstats to dump ACO statistics. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5358>
* radv/aco: enable VK_KHR_shader_subgroup_extended_types on GFX6-GFX7Samuel Pitoiset2020-06-052-2/+2
| | | | | | | | | | CTS pass on Pitcairn (GFX6). This extension isn't really useful without 8-bit/16-bit storage though but this is going to be exposed soon. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5327>
* radv: Use ac_surface to allocate aux surfaces.Bas Nieuwenhuizen2020-06-051-104/+18
| | | | | | | For consistency and a bunch of codesharing. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Allocate values/predicates at the end of the image.Bas Nieuwenhuizen2020-06-051-17/+26
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Disable HTILE in ac_surface.Bas Nieuwenhuizen2020-06-051-10/+11
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Disable DCC in ac_surface.Bas Nieuwenhuizen2020-06-051-29/+22
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Use offsets in surface struct.Bas Nieuwenhuizen2020-06-055-37/+33
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Rely on ac_surface for avoiding cmask for linear images.Bas Nieuwenhuizen2020-06-051-2/+1
| | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Enforce the contiguous memory for DCC layers in ac_surface.Bas Nieuwenhuizen2020-06-051-15/+3
| | | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Pass no_metadata_planes info in to ac_surface.Bas Nieuwenhuizen2020-06-051-33/+34
| | | | | | | | | | Also do not allocate aux surfaces for multi-plane images. I may have messed up and used plane 1 offsets for the other planes as well. I cannot imagine that sharing aux surfaces between the planes will work well. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv: Use ac_surface to determine fmask enable.Bas Nieuwenhuizen2020-06-051-8/+11
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5194>
* radv/aco: enable 64-bit atomic features if RADV is linked with LLVM 8Samuel Pitoiset2020-06-052-3/+3
| | | | | | | | Just in case someone links RADV with this old LLVM 8 and wants ACO. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5331>
* radv: Always expose non-visible local memory type on dedicated GPUsClément Guérin2020-06-041-18/+7
| | | | | | | | | | | DOOM Eternal expects this type, but RADV doesn't expose it when the VRAM is entirely host-visible, in my case on Fiji. Matches AMDVLK behavior. Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/3054 Cc: <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5308>
* radv: enable zero VRAM for all VKD3D (DX12->VK) gamesSamuel Pitoiset2020-06-031-34/+43
| | | | | | | | | | | To fix rendering issues with Metro Exodus, RE2 and 3 and probably more titles. It seems the default behaviour of DX12 anyways. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3064 Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5262>
* radv: enable zero VRAM for Doom EternalSamuel Pitoiset2020-06-031-0/+3
| | | | | | | | | | | That fixes some rendering issues. Probably some unitialized data from the game. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3064 Cc: <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5262>
* nir: add callback to nir_remove_dead_variables()Timothy Arceri2020-06-032-5/+7
| | | | | | | | | | | | This allows us to do API specific checks before removing variable without filling nir_remove_dead_variables() with API specific code. In the following patches we will use this to support the removal of dead uniforms in GLSL. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4797>
* radv: Use common gfx10_format_table.hBas Nieuwenhuizen2020-06-035-300/+5
| | | | | | | Save some python code and build time, as well as some code duplication. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
* radv: Include gfx10_format_table.h only from a single source file.Bas Nieuwenhuizen2020-06-032-12/+11
| | | | | | | | The radeonsi variant has everything in the header, so lets not include it everywhere. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5291>
* radv: Explicitly cast TIMESTAMP_NOT_READY value to uin32_t where needed.Oschowa2020-06-021-2/+2
| | | | | | | Fixes a clang warning. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>
* radv: Don't take absolute value of unsigned type.Oschowa2020-06-021-2/+2
| | | | | | | Fixes clang warnings. Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5228>
* radv/aco: Always enable subgroup shuffle.Timur Kristóf2020-06-021-8/+3
| | | | | | | | It is now supported by both backends on all hw. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5223>
* ac: rename has_double_rate_fp16 -> has_packed_math_16bitMarek Olšák2020-06-023-9/+9
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5003>
* meson: use gnu_symbol_visibility argumentDylan Baker2020-06-011-2/+3
| | | | | | | | | | This uses a meson builtin to handle -fvisibility=hidden. This is nice because we don't need to track which languages are used, if C++ is suddenly added meson just does the right thing. Acked-by: Matt Turner <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4740>
* 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>