Skip to content

Commit 0faccc8

Browse files
author
Ewan Crawford
authored
Add clBuildProgram to command-buffer extension samples (#869)
The sample code in the `cl_khr_command_buffer` and `cl_khr_command_buffer_mutable_dispatch` extensions was missing a call to `clBuildProgram` which would be required for the sample to work.
1 parent 9474eb9 commit 0faccc8

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

ext/cl_khr_command_buffer.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,8 @@ Add to Table 37, _Event Command Types_:
17971797
clCreateProgramWithSource(context, 1, &code, &length, &error);
17981798
CL_CHECK(error);
17991799
1800+
CL_CHECK(clBuildProgram(program, 1, &device, nullptr, nullptr, nullptr));
1801+
18001802
cl_kernel kernel = clCreateKernel(program, "vector_addition", &error);
18011803
CL_CHECK(error);
18021804

ext/cl_khr_command_buffer_mutable_dispatch.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Aharon Abramson, Intel. +
4040
Ben Ashbaugh, Intel. +
4141
Boaz Ouriel, Intel. +
4242
Pekka Jääskeläinen, Tampere University +
43+
Jan Solanti, Tampere University +
4344
Nikhil Joshi, NVIDIA +
4445
James Price, Google +
4546

@@ -776,6 +777,8 @@ command-buffer submissions.
776777
clCreateProgramWithSource(context, 1, &code, &length, &error);
777778
CL_CHECK(error);
778779
780+
CL_CHECK(clBuildProgram(program, 1, &device, nullptr, nullptr, nullptr));
781+
779782
cl_kernel kernel = clCreateKernel(program, "vector_addition", &error);
780783
CL_CHECK(error);
781784

0 commit comments

Comments
 (0)