summaryrefslogtreecommitdiffstats
path: root/src/amd
Commit message (Collapse)AuthorAgeFilesLines
* radv: print which ring is dumped in hang reportsSamuel Pitoiset2019-10-211-0/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not print useless descriptors info in hang reportsSamuel Pitoiset2019-10-211-74/+1
| | | | | | | | This information has never been useful. All descriptors are already dumped with colors etc, and it's more useful. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: enable VK_KHR_shader_float_controls on GFX6-GFX7Samuel Pitoiset2019-10-212-4/+4
| | | | | | | Disable 16-bit features because fp16 isn't exposed on these chips. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: implement VK_KHR_shader_float_controlsSamuel Pitoiset2019-10-186-3/+50
| | | | | | | | | | | | | | | | This exposes what's required for DX and this is what we already configure. The driver flushes denorms for FP32 and preserves them for FP16/FP64. Note that we can't allow both preserving and flushing denorms because this won't work for merged shaders. This will require LLVM to update the float mode register to make it work. Only enabled on GFX8+ with the LLVM path because it's untested on previous chips and ACO doesn't support it. This extension is required for SPIRV 1.4. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/llvm: force fneg/fabs to flush denorms to zero if requestedSamuel Pitoiset2019-10-181-0/+14
| | | | | | | | LLVM optimizes these instructions with XOR/AND and it loses the sign bit. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/llvm: add AC_FLOAT_MODE_ROUND_TO_ZEROSamuel Pitoiset2019-10-184-0/+5
| | | | | | | | Because some instructions will be optimized by the backend compiler, the driver has to manually flush to zero to keep the result exact. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* ac/llvm: add ac_build_canonicalize() helperSamuel Pitoiset2019-10-183-6/+33
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Fix single stage constant flush with merged shaders.Bas Nieuwenhuizen2019-10-181-5/+6
| | | | | | | | | e.g. a VERTEX only flush with tess on Vega should look at the TCS to see which bits are needed. CC: <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1953 Reviewed-by: Samuel Pitoiset <[email protected]>
* aco: don't combine minmax3 if there is a neg or abs modifier in betweenDaniel Schürmann2019-10-171-29/+1
| | | | | | | This fixes a graphical corruption in HotS. No pipelinedb changes other than that. Reviewed-by: Rhys Perry <[email protected]>
* radv: fix DCC fast clear code for intensity formats (correctly)Samuel Pitoiset2019-10-171-12/+9
| | | | | | | | | | | | Previous fix was pretty bogus. This fixes a rendering regression with Nier (minimap too large). Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1943 Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1952 Fixes: ea92273cea8 ("radv: fix DCC fast clear code for intensity formats") Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* aco: emit_split_vector() s_memtime resultsRhys Perry2019-10-161-0/+1
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: don't CSE s_memtimeRhys Perry2019-10-161-1/+1
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: fix scheduling with s_memtime/s_memrealtimeRhys Perry2019-10-161-0/+8
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* Revert "radv: do not emit PKT3_CONTEXT_CONTROL with AMDGPU 3.6.0+"Samuel Pitoiset2019-10-152-12/+6
| | | | | | | | | | | | | | This reverts commit 2ca8629fa9b303e24783b76a7b3b0c2513e32fbd. This was initially ported from RadeonSI, but in the meantime it has been reverted because it might hang. Be conservative and re-introduce this packet emission. Unfortunately this doesn't fix anything known. Cc: 19.2 <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: rename VK_KHR_shader_float16_int8 structs/constantsSamuel Pitoiset2019-10-151-3/+3
| | | | | | | Trivial change. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* android: amd/common: export amd/llvm headersMauro Rossi2019-10-141-0/+1
| | | | | | | | | | | | | Fixes the following building error: external/mesa/src/gallium/winsys/amdgpu/drm/amdgpu_winsys.c:42:10: fatal error: 'ac_llvm_util.h' file not found ^~~~~~~~~~~~~~~~ 1 error generated. Fixes: 3a08110 ("amd: Move all amd/common code that depends on LLVM to amd/llvm.") Signed-off-by: Mauro Rossi <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: fix DCC fast clear code for intensity formatsSamuel Pitoiset2019-10-143-9/+31
| | | | | | | | | | This fixes a rendering issue with DiRT 4 on GFX10. Only GFX10 was affected because intensity formats are different. Cc: 19.2 <[email protected]> Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1923 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: add exported symbols checkEric Engestrom2019-10-131-0/+13
| | | | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* aco: don't use p_as_uniform for vgpr sampler/image indicesRhys Perry2019-10-111-1/+3
| | | | | | | | p_as_uniform can get CSE'd, which can be incorrect and break some dEQP-VK.descriptor_indexing.* tests. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: implement divergent vulkan_resource_indexRhys Perry2019-10-112-4/+14
| | | | | | | | | Fixes the UBO/SSBO dEQP-VK.descriptor_indexing.* tests v2: remove bld.copy() usage Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: readfirstlane vgpr pointers in convert_pointer_to_64_bit()Rhys Perry2019-10-111-0/+2
| | | | | | | | | | | This can happen when bcsel is used between the results of two vulkan_resource_index. It's also probably needed for non-uniform descriptor indexing Fixes dEQP-VK.spirv_assembly.instruction.compute.variable_pointers.compute.reads_opselect_two_buffers Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: use can_accept_constant in valu_can_accept_literalRhys Perry2019-10-111-7/+8
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: don't apply sgprs/constants to read/write lane instructionsRhys Perry2019-10-111-1/+11
| | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>
* aco: update print_irRhys Perry2019-10-101-0/+39
| | | | | | | | Mostly adds GFX10 stuff. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-By: Timur Kristóf <[email protected]>
* aco: rework scratch resource codeRhys Perry2019-10-101-22/+28
| | | | | | | | Fix compute, cleanup and add GFX10 support. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-By: Timur Kristóf <[email protected]>
* aco/gfx10: disable GFX9 1D texture workaroundsRhys Perry2019-10-101-5/+5
| | | | | | | | Navi added back support for 1D textures. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-By: Timur Kristóf <[email protected]>
* aco/gfx10: fix inline uniform blocksRhys Perry2019-10-101-3/+9
| | | | | | Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-By: Timur Kristóf <[email protected]>
* radv/aco: disable NGG when ACO is usedRhys Perry2019-10-101-0/+4
| | | | | | | | Note that radv_device.c still has to be modified to use ACO with Navi. Signed-off-by: Rhys Perry <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-By: Timur Kristóf <[email protected]>
* ac/nir: add back nir_op_fmodMarek Olšák2019-10-101-0/+11
| | | | | | | | | radeonsi doesn't lower it for doubles. This partially reverts commit d861401554b52b2c2fc6721c69bdfe1697ee608f. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* radv: Enable VK_ANDROID_external_memory_android_hardware_buffer.Bas Nieuwenhuizen2019-10-101-1/+1
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Check the size of the imported buffer.Bas Nieuwenhuizen2019-10-104-4/+23
| | | | | | | This is a security feature to disallow malicious apps from passing a buffer that is too small. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Expose image handle compat types for Android handles.Bas Nieuwenhuizen2019-10-103-4/+50
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Allow Android image binding.Bas Nieuwenhuizen2019-10-103-3/+37
| | | | | | Using delayed layout of images. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/android: Add android hardware buffer import/export.Bas Nieuwenhuizen2019-10-103-7/+156
| | | | | | Support does not include images yet. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Deal with Android external formats.Bas Nieuwenhuizen2019-10-105-39/+76
| | | | | | | | To abstract things a bit, this adds a helper function in radv_android.c. However, this means we have to link in radv_android.c on non-android as well, which means some scaffolding changes. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Derive android usage from create flags.Bas Nieuwenhuizen2019-10-103-0/+43
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Disallow sparse shared images.Bas Nieuwenhuizen2019-10-101-8/+7
| | | | | | | | | Since we really cannot share them ever. Also remove an unused switch. Fixes: b70829708ac "radv: Implement VK_KHR_external_memory" Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/android: Add android hardware buffer queries.Bas Nieuwenhuizen2019-10-102-0/+182
| | | | | | | | | | | | Derived from the Intel code. For the internal format we just use the internal Vulkan format, as we have Vulkan formats for all android formats we care about. For the ycbcr properties we just do something. I do not have a real clue what would be recommended. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv/android: Add android hardware buffer field to device memory.Bas Nieuwenhuizen2019-10-102-0/+13
| | | | | | | You cannot go from BO to Android hardware buffer, so for export we have to remember it. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add VK_ANDROID_external_memory_android_hardware_buffer.Bas Nieuwenhuizen2019-10-102-0/+14
| | | | | | Still disabled but now we can add entrypoints. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Unset vk_info in radv_image_create_layout.Bas Nieuwenhuizen2019-10-101-4/+8
| | | | | | For better test coverage of this corner case. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Handle slightly different image dimensions.Bas Nieuwenhuizen2019-10-101-11/+99
| | | | | | | | | | | | | The minigbm comment really says it all. We should fix minigbm as well, but for now this is the more robust solution. Note that this only changes width and height for the surface creation, not for the image and hence also not for the sampler, where it would wreak havoc due to the normalized coords. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Delay patching for imported images until layout time.Bas Nieuwenhuizen2019-10-101-26/+35
| | | | | | | | | | | | | We want this flexibility because in GFX10 we lose any stride fields, so we have to make sure our width/height are in alignment with the external image we import. Furthermore, we need the ability to inject tiling modifiers on import time which is strictly after create time for Android. So, with the layout & patch functions being fully independent of pCreateInfo, we can delay it until import/bind time. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Split out layout code from image creation.Bas Nieuwenhuizen2019-10-101-61/+77
| | | | | | So we can delay the layout until later in some import cases. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Handle device memory alloc failure with normal free.Bas Nieuwenhuizen2019-10-101-12/+22
| | | | | | Less duplication/complexity. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Cleanup buffer_from_fd.Bas Nieuwenhuizen2019-10-103-6/+3
| | | | | | Unused stride/offset args. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Implement & enable VK_EXT_texel_buffer_alignment.Bas Nieuwenhuizen2019-10-102-0/+16
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: use a compute shader for copying timestamp query resultsSamuel Pitoiset2019-10-102-30/+227
| | | | | | | | | | | | | | When the timestamp is not ready (ie. UINT64_MAX), the availabily bit should be zero. The previous code used to copy the timestamp value as the availabily bit and that's completely wrong. Because it's not that simple to emit a conditional with the CP, the driver now uses a compute shader for copying timestamp query results. Fixes dEQP-VK.pipeline.timestamp.misc_tests.reset_query_before_copy. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: sync before resetting query pools if timestamps have been writtenSamuel Pitoiset2019-10-101-0/+10
| | | | | | | | Otherwise, the GPU might write timestamp queries after the reset operation. This is similar to other query operations. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* aco: Clean up usages of PhysReg::reg from aco_assembler.Timur Kristóf2019-10-101-27/+27
| | | | | | | | | These are not needed anymore, since PhyReg has an implicit conversion operator that can convert it to unsigned int, which is equivalent to accessing this field. Signed-off-by: Timur Kristóf <[email protected]> Reviewed-by: Daniel Schürmann <[email protected]>