clover: add 3.0 program properties
authorDave Airlie <airlied@redhat.com>
Wed, 7 Oct 2020 06:03:59 +0000 (16:03 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 16 Nov 2020 19:15:09 +0000 (05:15 +1000)
the real IL code will rewrite this

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7642>

src/gallium/frontends/clover/api/program.cpp

index 22c1870..ebe5f23 100644 (file)
@@ -461,6 +461,15 @@ clGetProgramInfo(cl_program d_prog, cl_program_info param,
          }, std::string(), prog.symbols());
       break;
 
+   case CL_PROGRAM_SCOPE_GLOBAL_CTORS_PRESENT:
+   case CL_PROGRAM_SCOPE_GLOBAL_DTORS_PRESENT:
+      buf.as_scalar<cl_bool>() = CL_FALSE;
+      break;
+
+   case CL_PROGRAM_IL:
+      if (r_size)
+         *r_size = 0;
+      break;
    default:
       throw error(CL_INVALID_VALUE);
    }
@@ -499,6 +508,10 @@ clGetProgramBuildInfo(cl_program d_prog, cl_device_id d_dev,
       buf.as_scalar<cl_program_binary_type>() = prog.build(dev).binary_type();
       break;
 
+   case CL_PROGRAM_BUILD_GLOBAL_VARIABLE_TOTAL_SIZE:
+      buf.as_scalar<size_t>() = 0;
+      break;
+
    default:
       throw error(CL_INVALID_VALUE);
    }