[Mesa-dev] [PATCH 00/26] RadeonSI getting ready for interop with HSA/OpenCL
maraeo at gmail.com
Wed Mar 2 16:36:09 UTC 2016
This patch series contains necessary radeonsi changes in order to support OpenGL-OpenCL interop. This only covers buffer and texture sharing.
The changes can be summarized to:
- write an image descriptor to amdgpu buffer metadata for OpenCL to use it
- buffer map/unmap optimizations need to be aware of shared buffers
- disable CMASK and DCC when needed
- allow texture sharing with DCC enabled
- get the PCI device location (group:bus:dev:func) for OpenCL to query it later
Dependent gallium patches sent separately:
- resource_from(get)_handle getting new flags
- new PCI device location CAPs
This radeonsi series and dependent gallium patches are required for being able to implement the already-proposed public Mesa interop API in st/dri, libGL, and libEGL.
Descriptions of the patches:
gallium/radeon: use a structure for passing tiling flags from/to winsys
gallium/radeon: remove rcs parameter from radeon_winsys::buffer_set_tiling
gallium/radeon: rename winsys buffer_get/set_tiling to buffer_get/set_metadata
- Cleaning up the winsys API for setting tiling flags, no functional changes.
winsys/amdgpu: allow drivers to set/get opaque metadata
- Adding amdgpu metadata support to the winsys.
gallium/radeon: move code initializing texture metadata to its own function
gallium/radeon: clean up r600_texture_get_handle
gallium/radeon: set texture metadata only once
- Starting to track which resources are shared.
gallium/radeon: don't set texture metadata for buffers
gallium/radeon: buffer valid range tracking only works with unshared buffers
gallium/radeon: if we can't discard a whole resource, discard the range instead
galilum/radeon: disallow reallocation of shared buffers
- Support for shared buffers.
gallium/radeon: check that handle usage doesn't change for a resource
gallium/radeon: remember that texture_from_handle was called and its flags
- More tracking of which resources are shared.
gallium/radeon: disallow handle export for MSAA & depth textures
gallium/radeon: don't use fast color clear if sharing doesn't allow it
gallium/radeon: eliminate fast color clear before sharing
gallium/radeon: disable CMASK on handle export if sharing doesn't allow it
- Disabling CMASK and fast clear for shared resources.
radeonsi: allocate DCC in the same backing buffer as the texture
radeonsi: add DCC decompression (v2)
radeonsi: disable DCC on handle export if expecting write access
- DCC sharing or disabling it.
radeonsi: accept pipe_resource in si_sampler_view_add_buffer
radeonsi: remove resource field from si_sampler_view
radeonsi: extract the buffer descriptor computation into its own function
radeonsi: extract the texture descriptor computation into its own function
- Nicolai's patches for GL_ARB_shader_image_load_store that I cherry-picked in order to get image descriptors without sampler views. The first 3 are dependencies of the 4th.
radeonsi: set amdgpu metadata before exporting a texture
- Finally writing image descriptors to metadata.
winsys/amdgpu: get PCI info
- Required by OpenCL for device identification.
More information about the mesa-dev