{"id":33108099,"url":"https://github.com/Dolkar/Tephra","last_synced_at":"2025-11-19T18:01:04.111Z","repository":{"id":181501737,"uuid":"626366088","full_name":"Dolkar/Tephra","owner":"Dolkar","description":"A modern, high-performance C++17 graphics and compute library based on Vulkan","archived":false,"fork":false,"pushed_at":"2025-10-16T15:19:14.000Z","size":5101,"stargazers_count":42,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-17T18:02:04.692Z","etag":null,"topics":["gpgpu","gpu","graphics","graphics-library","high-performance","low-level","performance","rendering","vulkan"],"latest_commit_sha":null,"homepage":"https://dolkar.github.io/Tephra/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dolkar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-11T10:21:57.000Z","updated_at":"2025-10-16T15:19:00.000Z","dependencies_parsed_at":"2023-12-20T21:33:05.304Z","dependency_job_id":"fe335621-f309-4f9b-8abe-af7ed8e1942f","html_url":"https://github.com/Dolkar/Tephra","commit_stats":null,"previous_names":["dolkar/tephra"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Dolkar/Tephra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolkar%2FTephra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolkar%2FTephra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolkar%2FTephra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolkar%2FTephra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dolkar","download_url":"https://codeload.github.com/Dolkar/Tephra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dolkar%2FTephra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285299189,"owners_count":27148079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-11-19T02:00:05.673Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpgpu","gpu","graphics","graphics-library","high-performance","low-level","performance","rendering","vulkan"],"created_at":"2025-11-15T00:00:35.753Z","updated_at":"2025-11-19T18:01:04.103Z","avatar_url":"https://github.com/Dolkar.png","language":"C++","readme":"# Tephra\n**_A modern C++17 graphics and compute library filling the gap between [Vulkan](https://www.vulkan.org/) and high-level APIs such as OpenGL._**\n\n**License**: [MIT](https://github.com/Dolkar/Tephra/blob/main/LICENSE)\n\n**Current version**: [v0.8.0](https://dolkar.github.io/Tephra/changelog.html)\n\n**Links**: [User guide](https://dolkar.github.io/Tephra/user-guide.html) | [API Documentation](https://dolkar.github.io/Tephra/annotated.html) |\n           [Discussions](https://github.com/Dolkar/Tephra/discussions)\n\n**Build status**: ![build status](https://github.com/Dolkar/Tephra/actions/workflows/build.yml/badge.svg)\n\n## About\n\nTephra aspires to provide a modern alternative to high-level graphics APIs like OpenGL and DirectX 11, while leveraging\nthe benefits of the underlying Vulkan ecosystem. Its goal is to strike a good balance between ease-of-use, performance\nand relevance. To that end, Tephra provides:\n- A high-level job system for submitting batches of work to the GPU (or to other accelerators that expose the Vulkan\n  API)\n- Low-level command lists that can be recorded in parallel and with minimal overhead\n- An easy and efficient way to create temporary images, staging buffers and scratch memory\n- A simple, general-purpose interface that tries not to force architectural decisions upon the user (such as the concept\n  of frames, requiring recording callbacks or a bindless resource model)\n- The ability to use bleeding-edge features of graphics hardware through direct interoperability with the Vulkan API\n- An introductory [user guide](https://dolkar.github.io/Tephra/user-guide.html), extensive\n  [documentation](https://dolkar.github.io/Tephra/annotated.html) and [examples](https://dolkar.github.io/Tephra/examples.html)\n  for getting started with using the library without prior knowledge of Vulkan\n- Debugging features, usage validation and testing suite (WIP)\n\n_Tephra is being used and partially developed by [Bohemia Interactive Simulations](https://bisimulations.com/)._\n\n\u003cbr/\u003e\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\u003cimg height=\"600\" width=\"600\" src=\"https://github.com/user-attachments/assets/402a48eb-9830-4fa0-a990-57e061845cf5\"/\u003e\u003c/div\u003e\n\u003cdiv align=\"center\"\u003eTephra path tracing example\u003c/div\u003e\n\u003cbr/\u003e\n\n### Comparison to OpenGL / DirectX 11\n\nOne of the main differences when moving over from these older graphics APIs is the execution model. Much like in Vulkan,\nyour draw calls don't take effect immediately in Tephra, but are instead recorded into either jobs or command lists that\nthen get executed at a later time. There is no \"immediate context\". This allows for easy parallel recording and\nfull control over the execution of workloads. Recording commands is usually done in two passes. A \"job\" first defines\nhigh-level commands such as:\n- Allocation of temporary job-local resources\n- Clears, copies, blits and resolves\n- Render and compute passes specifying target resources and forming a set of command lists to execute\n- Resource export commands and Vulkan interop commands\n\nThe actual draw and dispatch commands then get recorded into the command lists of each pass after the job itself has\nbeen finalized. For convenience, a callback function can be optionally used to record a small command list in-place to\nhelp with code organization.\n\nWhile Tephra handles most of the Vulkan-mandated synchronization automatically from the list of job commands,\nanalyzing commands recorded into command lists would have unacceptable performance overhead. This could ordinarily be\ncircumvented by manually specifying all the resource accesses of each render / compute pass, but for the majority of\nread-only accesses, the library offers the much more convenient \"export\" mechanism. Once an image or buffer is written\nto by a prior command or pass, it can be exported for all future accesses of a certain type, for example as a sampled\ntexture. In effect, for a resource used inside shaders, this means that you generally only need to specify how it is\ngoing to be read in the future after each time you write into it. In most cases that only needs to be done once.\n\nAnother system inherited from Vulkan is its binding model. By default, resources get bound as descriptors in sets,\nrather than individually. You can think of a material's textures - the albedo map, normal map, roughness map, etc -\nas one descriptor set, through which all of its textures get bound to a compatible shader pipeline at the same time.\nAlternatively, you can use the \"bindless\" style of managing a global array of all of your textures inside a single giant\ndescriptor set that you then index into inside your shaders. Tephra streamlines working with either method.\n \n### Comparison to Vulkan and other Vulkan abstractions\n\nStarting from the initialization stage, Tephra already provides amenities for interacting with the varied world of\nVulkan devices. Arbitrary number of queues can be used from each supported queue family, irrespective of the actual\nnumber exposed by Vulkan. Feature maps and format utilities further help handle hardware differences. Vulkan profile\nsupport is planned, making the process of choosing and relying upon a specific set of hardware features even easier.\nOverall, the initialization process is greatly simplified compared to raw Vulkan, akin to using the\n[vk-bootstrap](https://github.com/charles-lunarg/vk-bootstrap) library.\n\nTephra leverages [VMA](https://gpuopen.com/vulkan-memory-allocator/) for all of its resource allocations. On top of that,\nit allows efficient use of temporary resources within each job. Requested job-local resources can be aliased to the same\nmemory location to reduce memory usage if their usage does not overlap. Growable ring buffers provide temporary staging\nbuffers for easy uploading of data. The pools that all these reusable resources are allocated from are controllable and\nconfigurable. In general, the library tries to avoid allocations whenever possible, opting instead for pooling and reuse.\n\nRAII is used to manage the lifetime of resources and other objects. Their destruction is delayed until the device is done\nusing the objects, so they can be safely dropped even right after enqueuing a job. The idea of buffer and image views\nhas been expanded upon and nearly all interactions with resources are done through these non-owning views. They can\nreference the entire resource, or just its part, and are relatively cheap to create on the fly.\n\nAutomatic synchronization is implemented between all job commands submitted to the same queue. The implementation tries\nto minimize the number of barriers without reordering the commands - the control of that is left in the hands of\nthe user. All dependencies are resolved on a subresource level, including byte ranges for buffers and array layers / mip\nlevels for images. Synchronization across different queues is handled with timeline semaphores and resource exports in\na thread safe manner.\n\nMany other Vulkan abstractions opt for\n[render graphs](https://themaister.net/blog/2017/08/15/render-graphs-and-vulkan-a-deep-dive/) to manage synchronization\nand resource aliasing. Tephra's approach works the same as a render graph that does not reorder passes, but has a smaller\nAPI footprint, does not force resource virtualization and is already familiar to users of last-gen graphics APIs. A\nrender graph solution can be easily implemented on top of Tephra, if desired.\n\nDescriptor sets differ from Vulkan's by being immutable. Changing them requires waiting until the device is done with\nany workload that uses it, which is infeasible in practice. Instead, Tephra recycles and reuses old descriptor sets\nto create new ones in the background. Besides these ordinary descriptor sets, a mutable descriptor set implementation is\nalso provided. It can be useful for emulating the binding of individual resources, or to assist with a bindless resource\nmodel.\n\nTephra provides many other abstractions around Vulkan, such as pools, pipelines, swapchain and others to form an\nall-encompassing, high-level-ish graphics library. You generally do not need to use the Vulkan API directly, except when\nworking with extensions that Tephra does not natively support, or when interacting with various device properties and\nfeatures.\n\n## Feature list\n\nThe following features are already present:\n- All of the compute and graphics commands supported by core Vulkan\n- Automatic synchronization and resource state tracking inside and across queues\n- Temporary resource allocator that leverages aliasing to reduce memory usage\n- Support for multi-threaded recording and device-level thread safety\n- Improved image and buffer views\n- Safe delayed destruction of Vulkan handles\n- Timestamp, occlusion and pipeline queries\n- Ray tracing using the ray query API\n- Interoperability with plain Vulkan (WIP)\n- Native support of commonly used Vulkan extensions (WIP)\n- Debug logging, statistics, tests and partial usage validation (WIP)\n\nThe following features are planned and will likely be available in the future:\n- Ray tracing pipeline support (ray tracing with ray queries is already present)\n- Better handling of dynamic pipeline state\n- Improved pipeline building and management\n- Vulkan profiles\n\nThe following features are out of scope for the library and won't be included:\n- Platform-dependent window management - use GLFW or a similar library instead\n- Shader compilation and reflection - use the existing Vulkan ecosystem\n- CPU-side acceleration structure building and serialization\n- Rendering algorithms - this is not a renderer or a game engine\n\nSee the [user guide](https://dolkar.github.io/Tephra/user-guide.html) for more detailed explanations and inline code\nexamples of Tephra's features, or the [examples](https://github.com/Dolkar/Tephra/tree/main/examples) folder for a\nrunnable showcase.\n\n## Prerequisities\n\n- Tephra is a C++ library. It makes use of C++17 features, the standard library and C++ exceptions\n- Visual Studio 2022 (see build/Tephra.sln) or CMake 3.15 (limited support of tests and examples)\n- Vulkan headers version 1.4.304 or newer, provided with the SDK [here](https://www.lunarg.com/vulkan-sdk/)\n- Compatible devices must support Vulkan 1.3 or newer\n- While any x64 platform is supported, Tephra is being used and tested mainly on Windows\n\nBuilding the documentation:\n- Python 3.6 or newer\n- Doxygen 1.8.15 or newer\n- The [Jinja2](https://palletsprojects.com/p/jinja/) and [Pygments](https://pygments.org/) Python packages\n\n## Contributing\n\nFeel free to create issues, submit pull requests for non-trivial changes and participate in\n[Discussions](https://github.com/Dolkar/Tephra/discussions). Submitting examples, validation and tests is also very\nappreciated.\n\n\n","funding_links":[],"categories":["Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDolkar%2FTephra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDolkar%2FTephra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDolkar%2FTephra/lists"}