From cbd3fdb2ff4a082b8f28a0dc3bee857da9ed6e0b Mon Sep 17 00:00:00 2001 From: Greg Fischer Date: Fri, 1 Sep 2023 17:15:58 -0600 Subject: [PATCH] Specify aliasing and address space for vk::BufferPointer (#53) * Specify aliasing and address space for vk::BufferPointer Fixes #42. * Refer to C99 for definition of restrict pointer. * Explicitly specify buffer pointers point into host memory address space. --- proposals/0010-vk-buffer-ref.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/proposals/0010-vk-buffer-ref.md b/proposals/0010-vk-buffer-ref.md index 1026ed1d..58c8832c 100644 --- a/proposals/0010-vk-buffer-ref.md +++ b/proposals/0010-vk-buffer-ref.md @@ -180,6 +180,16 @@ A vk::BufferPointer can otherwise be used whereever the HLSL spec does not other Applying HLSL semantic annotations to objects of type vk::BufferPointer is disallowed. +### Buffer Pointers and Aliasing + +By default, buffer pointers are assumed to be restrict pointers as defined by the C99 standard. + +An attribute vk::aliased_pointer can be attached to a variable, function parameter or a block member of buffer pointer type. It is assumed that the pointee of an object with this attribute can overlap with the pointee of any other object with this attribute. + +### Buffer Pointers and Address Space + +All buffer pointers are presumed to point into the host memory address space. No new address space attributes are proposed. + ### Buffer Pointer Availability The following can be used at pre-processor time to determine if the current compiler supports vk::BufferPointer: __has_feature(hlsl_vk_buffer_pointer).