Skip to content

Commit

Permalink
Validate D3D12 alignment requirement when copying from a buffer to a …
Browse files Browse the repository at this point in the history
…texture
  • Loading branch information
RobDangerous committed Nov 5, 2024
1 parent fc490cc commit e98f300
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/kope/graphics5/commandlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ void kope_g5_command_list_copy_buffer_to_buffer(kope_g5_command_list *list, kope
void kope_g5_command_list_copy_buffer_to_texture(kope_g5_command_list *list, const kope_g5_image_copy_buffer *source,
const kope_g5_image_copy_texture *destination, uint32_t width, uint32_t height,
uint32_t depth_or_array_layers) {
#ifdef KOPE_G5_VALIDATION
assert(source->offset % 512 == 0); // D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT
#endif
KOPE_G5_CALL6(command_list_copy_buffer_to_texture, list, source, destination, width, height, depth_or_array_layers);
}

Expand Down

0 comments on commit e98f300

Please sign in to comment.