Revert https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4580
[mesa.git] / src / gallium / frontends / clover / core / device.cpp
index 7f3d970ea5fc391741905d1924282fa900b21a15..ca2d951c76777f4b8c754cf768c845b4767f5c4f 100644 (file)
@@ -238,7 +238,8 @@ device::svm_support() const {
    //
    // Another unsolvable scenario is a cl_mem object passed by cl_mem reference
    // and SVM pointer into the same kernel at the same time.
-   if (allows_user_pointers() && pipe->get_param(pipe, PIPE_CAP_SYSTEM_SVM))
+   if (pipe->get_param(pipe, PIPE_CAP_RESOURCE_FROM_USER_MEMORY) &&
+       pipe->get_param(pipe, PIPE_CAP_SYSTEM_SVM))
       // we can emulate all lower levels if we support fine grain system
       return CL_DEVICE_SVM_FINE_GRAIN_SYSTEM |
              CL_DEVICE_SVM_COARSE_GRAIN_BUFFER |
@@ -246,12 +247,6 @@ device::svm_support() const {
    return 0;
 }
 
-bool
-device::allows_user_pointers() const {
-   return pipe->get_param(pipe, PIPE_CAP_RESOURCE_FROM_USER_MEMORY) ||
-          pipe->get_param(pipe, PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY);
-}
-
 std::vector<size_t>
 device::max_block_size() const {
    auto v = get_compute_param<uint64_t>(pipe, ir_format(),