Fix buffer size for mutable dispatch command buffer test (#2437)

This commit is contained in:
Yilong Guo
2025-08-06 00:14:35 +08:00
committed by GitHub
parent e7e753f1a9
commit 466049474c

View File

@@ -135,7 +135,7 @@ struct MutableDispatchGlobalSize : public InfoMutableCommandBufferTest
for (size_t i = 0; i < num_elements; i++) for (size_t i = 0; i < num_elements; i++)
if (i >= update_global_size && global_work_size != resultData[i]) if (i >= update_global_size && global_work_size != resultData[i])
{ {
log_error("Data failed to verify: update_global_size != " log_error("Data failed to verify: global_work_size != "
"resultData[%zu]=%d\n", "resultData[%zu]=%d\n",
i, resultData[i]); i, resultData[i]);
return TEST_FAIL; return TEST_FAIL;
@@ -154,7 +154,7 @@ struct MutableDispatchGlobalSize : public InfoMutableCommandBufferTest
size_t info_global_size = 0; size_t info_global_size = 0;
const size_t update_global_size = 3; const size_t update_global_size = 3;
const size_t sizeToAllocate = global_work_size; const size_t sizeToAllocate = global_work_size * sizeof(cl_int);
const size_t num_elements = sizeToAllocate / sizeof(cl_int); const size_t num_elements = sizeToAllocate / sizeof(cl_int);
cl_mutable_command_khr command = nullptr; cl_mutable_command_khr command = nullptr;
}; };