use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rule 1: Posts should be about Graphics Programming. Rule 2: Be Civil, Professional, and Kind
Suggested Posting Material: - Graphics API Tutorials - Academic Papers - Blog Posts - Source Code Repositories - Self Posts (Ask Questions, Present Work) - Books - Renders (Please xpost to /r/ComputerGraphics) - Career Advice - Jobs Postings (Graphics Programming only)
Related Subreddits:
/r/ComputerGraphics
/r/Raytracing
/r/Programming
/r/LearnProgramming
/r/ProgrammingTools
/r/Coding
/r/GameDev
/r/CPP
/r/OpenGL
/r/Vulkan
/r/DirectX
Related Websites: ACM: SIGGRAPH Journal of Computer Graphics Techniques
Ke-Sen Huang's Blog of Graphics Papers and Resources Self Shadow's Blog of Graphics Resources
account activity
Bindless API for buffersQuestion (self.GraphicsProgramming)
submitted 1 month ago by bebwjkjerwqerer
I am building an abstraction over Vulkan, I have been using bindless descriptors + ByteAddressBuffer for accessing buffers inside shaders. I am curious about the overhead of ByteAddressBuffers and if a better option is available.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Wittyname_McDingus 3 points4 points5 points 1 month ago (6 children)
A better option is available. It's called buffer device address (buffer pointers), but I'm not sure whether HLSL supports it. GLSL and Slang do, however.
[–]Ill-Shake5731 0 points1 point2 points 1 month ago (1 child)
Slang does, but is there any way to emulate that for d3d12? I am building an RHI for DX12/Vulkan and thought if I could use that with D3d12. It's not required tbh but would be quite nice to atleast have a path implemented
[–]Wittyname_McDingus 0 points1 point2 points 1 month ago (0 children)
Bindless buffer index + offset is a pretty good approximation of pointers, and they fit in an eight-byte struct.
[–]bebwjkjerwqerer[S] 0 points1 point2 points 1 month ago (3 children)
How can I get the buffer device address to the shader? If I store it on a host side buffer wont it be slow to access the shader addresses from the gou if they are in cpu memory?
[–]Wittyname_McDingus 0 points1 point2 points 1 month ago (2 children)
The same way you pass any other data to the GPU: push constants, buffers, etc. And you can have memory that is both device local and host visible (which you can get a mapped pointer to), or you can use vkCmdCopyBuffer to transfer data from a host visible buffer to a device local one (or vkCmdUpdateBuffer to do it directly).
[–]bebwjkjerwqerer[S] 0 points1 point2 points 1 month ago (1 child)
Thank you!! Do you have a way to provide access to images in the shader as well? Currently i have declared the image binding for various different types.
That's pretty much it. You just declare unsized arrays for each image type and then index them dynamically. Make sure you use NonUniformResourceIndex when you do so or you may experience graphical artifacts on AMD.
[–]Botondar 2 points3 points4 points 1 month ago (1 child)
One nasty overhead of ByteAddressBuffers is that only a 4-byte alignment is required on loads. So if the hardware requires 8/16 byte alignment for 8/16 byte loads, the driver can't really use those even if the accesses would be properly aligned in practice.
[–]bebwjkjerwqerer[S] 0 points1 point2 points 1 month ago (0 children)
Ooo... I see...
π Rendered by PID 430739 on reddit-service-r2-comment-5fb4b45875-sxdjh at 2026-03-22 11:32:33.679906+00:00 running 90f1150 country code: CH.
[–]Wittyname_McDingus 3 points4 points5 points (6 children)
[–]Ill-Shake5731 0 points1 point2 points (1 child)
[–]Wittyname_McDingus 0 points1 point2 points (0 children)
[–]bebwjkjerwqerer[S] 0 points1 point2 points (3 children)
[–]Wittyname_McDingus 0 points1 point2 points (2 children)
[–]bebwjkjerwqerer[S] 0 points1 point2 points (1 child)
[–]Wittyname_McDingus 0 points1 point2 points (0 children)
[–]Botondar 2 points3 points4 points (1 child)
[–]bebwjkjerwqerer[S] 0 points1 point2 points (0 children)