ac: use amdgpu-flat-work-group-size
[mesa.git] / src / amd / common / ac_llvm_util.c
index 5b701603ebbe254bda0242bcd5a740a943c0501e..c8a8bf146fe56ee3ba080556e418ed6eb4a516f2 100644 (file)
@@ -269,6 +269,16 @@ ac_llvm_add_target_dep_function_attr(LLVMValueRef F,
        LLVMAddTargetDependentFunctionAttr(F, name, str);
 }
 
+void ac_llvm_set_workgroup_size(LLVMValueRef F, unsigned size)
+{
+       if (!size)
+               return;
+
+       char str[32];
+       snprintf(str, sizeof(str), "%u,%u", size, size);
+       LLVMAddTargetDependentFunctionAttr(F, "amdgpu-flat-work-group-size", str);
+}
+
 unsigned
 ac_count_scratch_private_memory(LLVMValueRef function)
 {