Bug 99950

Summary: Add cl_khr_int64_base_atomics to Clover and make it work on radeonsi
Product: Mesa Reporter: Vedran Miletić <vedran>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: enhancement    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 99553, 99764    

Description Vedran Miletić 2017-02-24 20:30:45 UTC
Documentation: https://www.khronos.org/registry/OpenCL/sdk/1.0/docs/man/xhtml/cl_khr_int64_base_atomics.html

Clang is aware of this extension:

tools/clang/lib/Basic/Targets.cpp:      Opts.support("cl_khr_int64_base_atomics");
tools/clang/lib/Sema/Sema.cpp:      //   cl_khr_int64_base_atomics and cl_khr_int64_extended_atomics
tools/clang/lib/Sema/Sema.cpp:      //   is supported and the cl_khr_int64_base_atomics and
tools/clang/lib/Sema/Sema.cpp:      //   atomic_ptrdiff_t are supported if the cl_khr_int64_base_atomics and
tools/clang/lib/Sema/Sema.cpp:            "cl_khr_int64_base_atomics cl_khr_int64_extended_atomics");

BUFFER_ATOMIC_*_X2 and FLAT_ATOMIC_*_X2 are available in LLVM/AMDGPU.

User/potential test: bug 99764
Comment 1 Jan Vesely 2017-02-24 20:58:28 UTC
This should be rather straightforward:
add wrappers to libclc (use generic/lib/atomic/atomic_impl.ll as example)
add piglit tests
Comment 2 Jan Vesely 2017-09-27 15:27:17 UTC
you'll need latest mesa (17.3) and libclc >=r313811

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.