Skip to content

Conversation

@rjodinchr
Copy link
Contributor

@kpet draft implementation followed by:

  • Compile with CL_ENABLE_BETA_EXTENSIONS
  • Complete implementation for new cl*CommandBufferKHR functions
  • Complete implementation for new DeviceInfo entries
  • Commands can be reused:
    • Reset event
    • Remove command from event
    • Move QueryPool inside event instead of command
  • Add optional support to fill image on device (used by default for
    command buffer)
  • Refcount command for easier lifetime management
  • cvk_command_batch holds both commands and events as getting event
    through command cannot be done once the command has been executed.
  • Add 'clone' method for all commands for queue migration

@rjodinchr
Copy link
Contributor Author

As discussed, forcing read/write flags for all images to support fill on device is not great as it can have a significant impact on performance for some workloads.
On top of that the implementation is either breaking test_api negative_set_read_write_image_arg or test_cl_khr_command_buffer copy_image. One requires to return an error for image not matching the access qualifier, while the other has a read_only image that is getting fill on device, thus it gets passed to the kernel using a write_only qualifier.

@rjodinchr rjodinchr force-pushed the pr/cmdbuf branch 2 times, most recently from d59877c to 6be4cdd Compare September 9, 2025 08:40
@rjodinchr
Copy link
Contributor Author

I have updated that PR with a new implementation that does not require all images to use read/write flags. It creates a second image (with write_only flag) using the same VkDeviceMemory at runtime when it detects a fillimage on a read_only image.

kpet and others added 2 commits September 9, 2025 17:54
Change-Id: Ida268ca818c0b5c124b65e6fd97ff3b1031f80b4
- Compile with CL_ENABLE_BETA_EXTENSIONS
- Complete implementation for new cl*CommandBufferKHR functions
- Complete implementation for new DeviceInfo entries
- Commands can be reused:
  - Reset event
  - Remove command from event
  - Move QueryPool inside event instead of command
- Add optional support to fill image on device (used by default for
  command buffer)
- Refcount command for easier lifetime management
- cvk_command_batch holds both commands and events as getting event
  through command cannot be done once the command has been executed.
- Add 'clone' method for all commands for queue migration
@rjodinchr
Copy link
Contributor Author

Marking as draft while the fill image on device PR is under review.

@rjodinchr rjodinchr marked this pull request as draft September 9, 2025 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants