X-Git-Url: https://git.libre-soc.org/?p=mesa.git;a=blobdiff_plain;f=src%2Fgallium%2Ffrontends%2Fclover%2Fcore%2Fresource.cpp;h=c3c6cce5f3bf098bfe9b23a7801ba2d5d8151751;hp=b8e257db6dc1be2c221a0dc10b6aeddc59a47bf1;hb=c0f7f833eb9c968e9f1491117d3ddc072eefddb7;hpb=08ceba943d280759b01973dec291eaa14a820894 diff --git a/src/gallium/frontends/clover/core/resource.cpp b/src/gallium/frontends/clover/core/resource.cpp index b8e257db6dc..c3c6cce5f3b 100644 --- a/src/gallium/frontends/clover/core/resource.cpp +++ b/src/gallium/frontends/clover/core/resource.cpp @@ -127,8 +127,6 @@ root_resource::root_resource(clover::device &dev, memory_obj &obj, command_queue &q, const std::string &data) : resource(dev, obj) { pipe_resource info {}; - const bool user_ptr_support = dev.pipe->get_param(dev.pipe, - PIPE_CAP_RESOURCE_FROM_USER_MEMORY); if (image *img = dynamic_cast(&obj)) { info.format = translate_format(img->format()); @@ -147,7 +145,7 @@ root_resource::root_resource(clover::device &dev, memory_obj &obj, PIPE_BIND_COMPUTE_RESOURCE | PIPE_BIND_GLOBAL); - if (obj.flags() & CL_MEM_USE_HOST_PTR && user_ptr_support) { + if (obj.flags() & CL_MEM_USE_HOST_PTR && dev.allows_user_pointers()) { // Page alignment is normally required for this, just try, hope for the // best and fall back if it fails. pipe = dev.pipe->resource_from_user_memory(dev.pipe, &info, obj.host_ptr());