aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_formats.c
Commit message (Collapse)AuthorAgeFilesLines
* radv: Expose image handle compat types for Android handles.Bas Nieuwenhuizen2019-10-101-4/+25
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Deal with Android external formats.Bas Nieuwenhuizen2019-10-101-11/+13
| | | | | | | | 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-101-0/+13
| | | | 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/gfx10: fix maximum number of mip levels for 3D imagesSamuel Pitoiset2019-07-111-4/+10
| | | | | | | | | | The dimensions also have to be adjusted if the number of supported mip levels is changed. This fixes dEQP-VK.api.info.image_format_properties.3d.*. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: increase maximum number of layers to 8192Samuel Pitoiset2019-07-071-2/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv/gfx10: increase maximum number of levels to 14Samuel Pitoiset2019-07-071-1/+2
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Disable linear tiled compressed textures.Bas Nieuwenhuizen2019-06-181-0/+4
| | | | | | Support got removed in the new addrlib update. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Decompress DCC when the image format is not allowed for buffers.Bas Nieuwenhuizen2019-06-171-2/+3
| | | | | | | | | | Otherwise the buffer loads/stores in the bufimage meta operations fail. If we decompress DCC then we can use the "canonical" format compatible with the not-supported format. CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* ac: rename SI-CIK-VI to GFX6-GFX7-GFX8Marek Olšák2019-05-151-1/+1
| | | | | | | | | | | | Acked-by: Dave Airlie <[email protected]> We already use GFX9 and I don't want us to have confusing naming in the driver. GFXn naming is better from the driver perspective, because it's the real version of the gfx portion of the hw. Also, CIK means Bonaire-Kaveri-Kabini, it doesn't mean CI. It shouldn't confuse our SDMA, UVD, VCE etc. code much. Those have nothing to do with GFXn and they have their own version numbers.
* radv: Implement cosited_even sampling.Bas Nieuwenhuizen2019-05-061-0/+1
| | | | | | | | | | Apparently cosited_even was the required one instead of midpoint. This adds slight offset of 0.5 pixels to the coordinates (+ we need the image size to convert to normalized coords) Fixes: 91702374d5d "radv: Add ycbcr lowering pass." Acked-by: Samuel Pitoiset <[email protected]>
* radv: Disable subsampled formats.Bas Nieuwenhuizen2019-05-061-1/+2
| | | | | | | | | | | | | Broken on Polaris and since I discovered NV12 is not subsampled, but a 2-plane format I decided I don't really care. Work to do to re-enable: 1) Figure out which devices support it natively. 2) Write some software emulation for the others. Fixes: 52c1adda21b "radv: Add ycbcr format features." Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: fix color conversions for normalized uint/sint formatsSamuel Pitoiset2019-05-021-4/+16
| | | | | | | | | | | | | The hardware actually rounds before conversion. This now matches what values are used when performing fast clears vs slow clears. This fixes a rendering issue with Far Cry 3&4. This also fixes a bunch of CTS tests that use a 8-bit UNORM format (only when the 512*512 image size hint is manually disabled). Cc: "19.0" "19.1" <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Restrict YUVY formats to 1 layer.Bas Nieuwenhuizen2019-05-021-0/+7
| | | | | Fixes: 8bb3cec7c9b "radv: Expose VK_EXT_ycbcr_image_arrays." Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add ycbcr format features.Bas Nieuwenhuizen2019-04-251-0/+27
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add logic for multisample format descriptions.Bas Nieuwenhuizen2019-04-251-0/+11
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add logic for subsampled format descriptions.Bas Nieuwenhuizen2019-04-251-0/+12
| | | | Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Sync ETC2 whitelisted devices.Bas Nieuwenhuizen2019-02-201-3/+9
| | | | | Fixes: 4bb6c49375e "radv: Allow ETC2 on RAVEN and VEGA10 instead of all GFX9." Reviewed-by: Dave Airlie <[email protected]>
* radv: remove a few more unnecessary KHR suffixesEric Engestrom2019-01-101-9/+9
| | | | | | Cc: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> (v1)
* radv: get rid of bunch of KHR suffixesSamuel Pitoiset2019-01-091-41/+41
| | | | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Eric Engestrom <[email protected]> Signed-off-by: Samuel Pitoiset <[email protected]>
* radv: enable shaderStorageImageMultisample feature on GFX8+Samuel Pitoiset2018-12-201-2/+1
| | | | | | | Untested on older chips. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Work around non-renderable 128bpp compressed 3d textures on GFX9.Bas Nieuwenhuizen2018-12-201-0/+12
| | | | | | | | | | | Exactly what title says, the new addrlib does not allow the above with certain dimensions that the CTS seems to hit. Work around it by not allowing the app to render to it via compat with other 128bpp formats and do not render to it ourselves during copies. Fixes: 776b9113656 "amd/addrlib: update Mesa's copy of addrlib" Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: do not support blitting surfaces for R32G32B32 formatsSamuel Pitoiset2018-10-121-0/+7
| | | | | | Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108113 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: disallow 3D images and mipmaps/layers for R32G32B32 linear formatsSamuel Pitoiset2018-10-111-0/+14
| | | | | | | | R32G32B32 are weird formats and we are only going to support some basic operations for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not support blitting surfaces with depth and stencilSamuel Pitoiset2018-09-191-0/+4
| | | | | | | | | | | Fixes: dEQP-VK.api.copy_and_blit.core.blit_image.all_formats.depth_stencil.d32_sfloat_s8_uint_d32_sfloat_s8_uint.optimal_optimal_nearest And all friends that try to blit a surface with different depth and stencil formats. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: don't expose linear depth surfaces on SI/CIK/VI either.Dave Airlie2018-09-031-3/+2
| | | | | | | | | | | ac_surface.c: gfx6_compute_surface says /* DB doesn't support linear layouts. */ Now if we expose linear depth and create a linear depth image and use CmdCopyImage to copy into it, we can't map the underlying memory and read it linearly which I think should work. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Add missing checks in radv_get_image_format_properties.Bas Nieuwenhuizen2018-08-301-0/+19
| | | | | CC: <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Allow ETC2 on RAVEN and VEGA10 instead of all GFX9.Bas Nieuwenhuizen2018-08-141-1/+2
| | | | | | | Follow radeonsi. Fixes: 3665f66ef26 "radv: Add support for ETC2 textures." Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add support for ETC2 textures.Bas Nieuwenhuizen2018-07-271-0/+36
| | | | | | Was surprised that is even supported by Vega. Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: fix Coverity no effect control flow issueTimothy Arceri2018-06-071-1/+1
| | | | | swizzle is unsigned so "desc->swizzle[c] < 0" is never true. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Do not hardcode fast clear formats.Bas Nieuwenhuizen2018-06-051-180/+73
| | | | | | | | except for the odd one out. This should support many more formats. Reviewed-by: Dave Airlie <[email protected]>
* radv: Add option to print errors even in optimized builds.Bas Nieuwenhuizen2018-05-311-1/+1
| | | | | | | | | | | Errors are not that common of a case so we can eat a slight perf hit in having to call a function and do a runtime check. In turn this makes debugging random errors happening for end users easier, because they don't have to have a debug build on hand. Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Disable texel buffers with A2 SNORM/SSCALED/SINT for pre-vega.Bas Nieuwenhuizen2018-05-141-0/+19
| | | | | | | | | The hardware always interprets the alpha as unsigned and fixing it in the shader is going to add unacceptable overheads. CC: 18.0 18.1 <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106480 Reviewed-by: Samuel Pitoiset <[email protected]>
* radv: Add support for IMG_DATA_FORMAT_32_32_32.Bas Nieuwenhuizen2018-05-141-4/+6
| | | | | | | | | | Basic sampling support for linear tiling. No CTS regressions, but it seems the blitting coverage is not very extensive. https://bugs.freedesktop.org/show_bug.cgi?id=106331 Reviewed-by: Samuel Pitoiset <[email protected]>
* util: Move util_is_power_of_two to bitscan.h and rename to ↵Ian Romanick2018-03-291-2/+2
| | | | | | | | | | | util_is_power_of_two_or_zero The new name make the zero-input behavior more obvious. The next patch adds a new function with different zero-input behavior. Signed-off-by: Ian Romanick <[email protected]> Suggested-by: Matt Turner <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]>
* radv: add support for VK_EXT_sampler_filter_minmaxSamuel Pitoiset2018-03-281-0/+36
| | | | | | | The driver only supports the required formats for now. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Update MAX_API_VERSION to 1.1.0Bas Nieuwenhuizen2018-03-071-4/+4
| | | | | | | v2: Don't bump supported version. v3: Update json files. Reviewed-by: Dave Airlie <[email protected]>
* radv: implement VK_EXT_external_memory_hostFredrik Höglund2018-02-081-6/+24
| | | | | | | Ported from the radeonsi GL_AMD_pinned_memory implementation. Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Don't allow 3d or 1d depth/stencil textures.Bas Nieuwenhuizen2018-01-221-0/+3
| | | | | | | | | | addrlib asserts when that happens, and supporting it is not required so lets not allow this for now. It also assert on fmask, but we don't have the number of samples here. CC: <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
* radv: Implement VK_EXT_external_memory_dma_bufJason Ekstrand2017-12-041-2/+6
| | | | | Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* radv: it isn't an error to not support a format or driverDave Airlie2017-11-161-1/+1
| | | | | | | | | | | This reverts two of the vk_error changes: reporting unsupported format is common, and testing non-amdgpu drivers and ignoring them is also common. Fixes: cd64a4f70 (radv: use vk_error() everywhere an error is returned) Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: use vk_error() everywhere an error is returnedSamuel Pitoiset2017-11-131-1/+1
| | | | | | | For consistency and it might help for debugging purposes. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: Add R16G16B16A16_SNORM fast clear supportAlex Smith2017-10-111-0/+6
| | | | | | Signed-off-by: Alex Smith <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* amd: move r600d_common.h into r600gMarek Olšák2017-10-091-15/+14
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radv: Add code to check if two formats can share DCC metadata.Bas Nieuwenhuizen2017-09-161-0/+85
| | | | | | Ported from radeonsi. Reviewed-by: Dave Airlie <[email protected]>
* radv/gfx9: don't expose linear depth on vega.Dave Airlie2017-08-241-0/+4
| | | | | | | | This just zeros out the linear flags for gfx9 + depth formats. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Cc: "17.2" <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: don't set dedicated bit for buffer external memory.Dave Airlie2017-07-241-2/+1
| | | | | | | | | | This is an alternate fix for the buffer export dedicated interaction. Fixes CTS dEQP-VK.api.external.memory.opaque_fd.dedicated.buffer.info Fixes: b70829708a (radv: Implement VK_KHR_external_memory) Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv/clear: add r32g32b32a32 fast clear support (v2)Dave Airlie2017-07-171-0/+21
| | | | | | | | | | | | | We can only fast clear 128-bit images if the r/g/b channels are the same, and we are using DCC. For DCC we'll bail out on translate if this isn't true, and we catch cmask clears explicitly. v2: remove 64-bit block (Bas), add uint32 as well. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* radv: Implement VK_KHR_external_memoryJason Ekstrand2017-07-151-0/+112
| | | | | | | | | This effectively reverts commit 43a171878bb4b5aedb36a. Technically, VK_KHR_get_memory_requirements2 and VK_KHR_dedicated_allocation are required for the KHR version but this at least restores the removed functionality. This patch builds but has received zero testing. Acked-by: Dave Airlie <[email protected]>
* radv: Drop support for VK_KHX_external_semaphore_*Jason Ekstrand2017-07-151-112/+0
| | | | | | | These have been formally deprecated by Khronos never to be shipped again. The KHR versions should be implemented/used instead. Acked-by: Dave Airlie <[email protected]>