Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline creation #102

Open
wants to merge 50 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
c012e21
added initial new flat types for pipeline manager
Ipotrick Sep 6, 2024
53204b7
Tg additions
Ipotrick Sep 7, 2024
956686d
- renamed language define
Ipotrick Sep 7, 2024
37044f0
[TaskGraph] Fix access api in task interface
Ipotrick Sep 11, 2024
8fb35ae
Merge branch 'pipeline_creation' of https://github.com/Ipotrick/Daxa …
Ipotrick Sep 11, 2024
ec5d14e
[Shader] added .get() function to sampler ids in slang
Ipotrick Sep 11, 2024
791e022
Merge branch 'pipeline_creation' of https://github.com/Ipotrick/Daxa …
Ipotrick Sep 11, 2024
02c92a5
fix mandelbrot
Ipotrick Sep 11, 2024
b51cf3f
Merge branch 'pipeline_creation' of https://github.com/Ipotrick/Daxa …
Ipotrick Sep 11, 2024
3907167
Fix retarded mistakes
Ipotrick Sep 11, 2024
f39ddd7
fix typed index handle name in slang header
Ipotrick Sep 14, 2024
0c44b4e
Fix some warnings
GabeRundlett Sep 14, 2024
cfe0436
Fix compile issues, and make all samples run (except Jaisiero's, whic…
GabeRundlett Sep 14, 2024
34898ff
[General] fix linking issues for types.hpp to_string functions
Ipotrick Sep 14, 2024
91363bd
Merge branch 'pipeline_creation' of https://github.com/Ipotrick/Daxa …
Ipotrick Sep 14, 2024
2c0caef
added graph global additional transient image usage flags
Ipotrick Sep 15, 2024
1f57bed
Merge branch 'pipeline_creation' of https://github.com/Ipotrick/Daxa …
Ipotrick Sep 15, 2024
9cc370c
{TaskGraph] added task name to task interface
Ipotrick Sep 15, 2024
c40205d
[TaskGraph] added pre and post task callbacks for debugging
Ipotrick Sep 16, 2024
b3b56f9
fix various to_string functions
Ipotrick Sep 18, 2024
56fb320
[TaskGraph] Redo api for copy and clear on buffer and image. Add chec…
Ipotrick Sep 22, 2024
89a1eb8
[TaskGraph] Added InlineTaskWithHead
Ipotrick Sep 24, 2024
1e8e13c
fix image id array typed handles
Ipotrick Sep 25, 2024
d1b6cd6
[CommandRecorder] refactor all error returns to use new return if err…
Ipotrick Sep 25, 2024
be3dbbd
fix for inline names
Ipotrick Sep 30, 2024
8ada702
[MemUtil] Improve default alignment to be alignof(T) for allocations
Ipotrick Oct 5, 2024
609ce86
Misc Task Graph Changes
Ipotrick Nov 4, 2024
902e423
Task Graph
Ipotrick Nov 6, 2024
a315243
enable debug info in slang
Ipotrick Nov 15, 2024
8864923
added tlas .get() function in slang hlsl
Ipotrick Dec 7, 2024
040c48c
Bugfixes
Ipotrick Dec 9, 2024
9931b93
Add missing include
GabeRundlett Nov 19, 2024
065260e
Fix missing header <algorithm> for std::sort (#96)
FrankXie05 Oct 10, 2024
919eff1
Add missing include to fix Linux build (#97)
tunis4 Nov 8, 2024
8869632
fixed invalid enable of explicit feature
MatejSakmary Jan 9, 2025
5c9f0a0
Fix bug in device creation validation
Ipotrick Jan 9, 2025
5db3ec2
removed obsolete if statement
MatejSakmary Jan 9, 2025
2e9c0cc
Fix minor bug in default SBT
GabeRundlett Jan 16, 2025
e7f1516
Merge branch 'master' into pipeline_creation
Ipotrick Jan 25, 2025
588838f
d
Ipotrick Jan 25, 2025
173c557
Merge branch 'master' into pipeline_creation
Ipotrick Feb 16, 2025
9c0f2f9
Added new raytracing pipeline manager functions
Ipotrick Feb 16, 2025
f23c5c2
added two missing nodiscards
Ipotrick Feb 16, 2025
5828f54
added new pipeline manager raster api, cleaned deprecation
Ipotrick Feb 16, 2025
d11847b
fix index type in slang
Ipotrick Feb 16, 2025
d552787
cleaned deprecations
Ipotrick Feb 16, 2025
3624574
Fix compile errors + add auto complete for shader infos to rt and ras…
Ipotrick Feb 17, 2025
c1da962
- fix bug in default image view creation
Ipotrick Mar 6, 2025
03bbf52
updated push constants handling
Ipotrick Mar 9, 2025
aa920e6
Added debug check for image view creation
Ipotrick Mar 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/daxa/c/command_recorder.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ typedef struct
{
void const * data;
uint64_t size;
uint32_t offset;
uint32_t offset; // deprecated API 3.1
} daxa_PushConstantInfo;

typedef struct
Expand Down
7 changes: 4 additions & 3 deletions include/daxa/c/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@

#define _DAXA_TEST_PRINT(...)

#define DAXA_SHADERLANG_GLSL 1
#define DAXA_SHADERLANG_SLANG 2

static uint32_t const DAXA_ID_INDEX_BITS = 20;
static uint32_t const DAXA_ID_INDEX_MASK = (1ull << 20) - 1ull;
static uint32_t const DAXA_ID_INDEX_OFFSET = 0;
Expand Down Expand Up @@ -232,6 +229,10 @@ daxa_u32mat4x4;
#pragma warning(pop)
#endif

static uint32_t const DAXA_MAX_PUSH_CONSTANT_WORD_SIZE = (32);
static uint32_t const DAXA_MAX_PUSH_CONSTANT_BYTE_SIZE = (DAXA_MAX_PUSH_CONSTANT_WORD_SIZE * 4);
static uint32_t const DAXA_PIPELINE_LAYOUT_COUNT = (DAXA_MAX_PUSH_CONSTANT_WORD_SIZE + 1);

// TODO(Raytracing): Should this say like this?
static uint32_t const DAXA_GEOMETRY_INSTANCE_TRIANGLE_FACING_CULL_DISABLE = 0x00000001;
static uint32_t const DAXA_GEOMETRY_INSTANCE_TRIANGLE_FLIP_FACING = 0x00000002;
Expand Down
34 changes: 34 additions & 0 deletions include/daxa/c/pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ typedef struct
daxa_SmallString name;
} daxa_RayTracingPipelineInfo;

static daxa_RayTracingPipelineInfo const DAXA_DEFAULT_RAY_TRACING_PIPELINE_INFO = {
.ray_gen_stages = DAXA_ZERO_INIT,
.miss_stages = DAXA_ZERO_INIT,
.callable_stages = DAXA_ZERO_INIT,
.intersection_stages = DAXA_ZERO_INIT,
.closest_hit_stages = DAXA_ZERO_INIT,
.any_hit_stages = DAXA_ZERO_INIT,
.shader_groups = DAXA_ZERO_INIT,
.max_ray_recursion_depth = DAXA_ZERO_INIT,
.push_constant_size = DAXA_MAX_PUSH_CONSTANT_BYTE_SIZE,
.name = DAXA_ZERO_INIT,
};

DAXA_EXPORT daxa_RayTracingPipelineInfo const *
daxa_ray_tracing_pipeline_info(daxa_RayTracingPipeline ray_tracing_pipeline);

Expand All @@ -74,6 +87,12 @@ typedef struct
daxa_SmallString name;
} daxa_ComputePipelineInfo;

static daxa_ComputePipelineInfo const DAXA_DEFAULT_COMPUTE_PIPELINE_INFO = {
.shader_info = DAXA_ZERO_INIT,
.push_constant_size = DAXA_MAX_PUSH_CONSTANT_BYTE_SIZE,
.name = DAXA_ZERO_INIT,
};

DAXA_EXPORT daxa_ComputePipelineInfo const *
daxa_compute_pipeline_info(daxa_ComputePipeline compute_pipeline);

Expand Down Expand Up @@ -192,6 +211,21 @@ typedef struct
daxa_SmallString name;
} daxa_RasterPipelineInfo;

static daxa_RasterPipelineInfo const DAXA_DEFAULT_RASTERIZER_PIPELINE_INFO = {
.mesh_shader_info = DAXA_ZERO_INIT,
.vertex_shader_info = DAXA_ZERO_INIT,
.tesselation_control_shader_info = DAXA_ZERO_INIT,
.tesselation_evaluation_shader_info = DAXA_ZERO_INIT,
.fragment_shader_info = DAXA_ZERO_INIT,
.task_shader_info = DAXA_ZERO_INIT,
.color_attachments = DAXA_ZERO_INIT,
.depth_test = DAXA_ZERO_INIT,
.tesselation = DAXA_ZERO_INIT,
.raster = DAXA_ZERO_INIT,
.push_constant_size = DAXA_MAX_PUSH_CONSTANT_BYTE_SIZE,
.name = DAXA_ZERO_INIT,
};

DAXA_EXPORT daxa_RasterPipelineInfo const *
daxa_raster_pipeline_info(daxa_RasterPipeline raster_pipeline);

Expand Down
5 changes: 2 additions & 3 deletions include/daxa/command_recorder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace daxa
{
void const * data = {};
u64 size = {};
u32 offset = {};
[[deprecated("parameter ignored. API: 3.1")]] u32 offset = {};
};

struct CommandRecorderInfo
Expand Down Expand Up @@ -312,12 +312,11 @@ namespace daxa

void push_constant_vptr(PushConstantInfo const & info);
template <typename T>
void push_constant(T const & constant, u32 offset = 0)
void push_constant(T const & constant, [[maybe_unused]] [[deprecated("parameter ignored. API: 3.1")]] u32 offset = 0)
{
push_constant_vptr({
.data = static_cast<void const *>(&constant),
.size = static_cast<u32>(sizeof(T)),
.offset = offset,
});
}
void set_pipeline(RasterPipeline const & pipeline);
Expand Down
50 changes: 25 additions & 25 deletions include/daxa/daxa.inl
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,17 @@
#define DAXA_BUFFER_DEVICE_ADDRESS_BUFFER_BINDING 4
#define DAXA_ACCELERATION_STRUCTURE_BINDING 5

#define DAXA_LANGUAGE_C 0
#define DAXA_LANGUAGE_CPP 0
#define DAXA_LANGUAGE_GLSL 2
#define DAXA_LANGUAGE_SLANG 3
#define DAXA_LANGUAGE_HLSL DAXA_LANGUAGE_SLANG

#if defined(_STDC_) // C
#define DAXA_SHADER 0
#elif defined(__cplusplus) // C++
#define DAXA_SHADER 0
#elif defined(GL_core_profile) // GLSL
#define DAXA_SHADER 1
#define DAXA_SHADERLANG DAXA_SHADERLANG_GLSL
#else // SLANG
#define DAXA_SHADER 1
#define DAXA_SHADERLANG DAXA_SHADERLANG_SLANG
#endif

#if DAXA_SHADER
#define DAXA_SHADERLANG_GLSL 1
#define DAXA_SHADERLANG_SLANG 2
#if DAXA_SHADERLANG == DAXA_SHADERLANG_GLSL
#include <daxa/daxa.glsl>
#elif DAXA_SHADERLANG == DAXA_SHADERLANG_SLANG
#include "daxa/daxa.slang"
#endif
#else
#if defined(_STDC_)
#define DAXA_SHADER 0
#define DAXA_LANGUAGE DAXA_LANGUAGE_C
#include <daxa/c/daxa.h>

/// @brief Buffer ptr enable is ignored in c++.
#define DAXA_DECL_BUFFER_PTR(STRUCT_TYPE)
#define DAXA_DECL_BUFFER_PTR_ALIGN(STRUCT_TYPE, ALIGN)
Expand All @@ -40,9 +27,11 @@
/// @brief Buffer ptr types map to the buffer device address type in daxa.
#define daxa_BufferPtr(x) daxa_DeviceAddress

#else
#include <daxa/daxa.hpp>
#elif defined(__cplusplus) // C++

#define DAXA_SHADER 0
#define DAXA_LANGUAGE DAXA_LANGUAGE_CPP
#include <daxa/daxa.hpp>
/// @brief Buffer ptr enable is ignored in c++.
#define DAXA_DECL_BUFFER_PTR(STRUCT_TYPE)
#define DAXA_DECL_BUFFER_PTR_ALIGN(STRUCT_TYPE, ALIGN)
Expand All @@ -51,5 +40,16 @@
/// @brief Buffer ptr types map to the buffer device address type in daxa.
#define daxa_BufferPtr(x) daxa::types::DeviceAddress

#endif
#endif
#elif defined(GL_core_profile) // GLSL

#define DAXA_SHADER 1
#define DAXA_LANGUAGE DAXA_LANGUAGE_GLSL
#include <daxa/daxa.glsl>

#else // SLANG

#define DAXA_SHADER 1
#define DAXA_LANGUAGE DAXA_LANGUAGE_SLANG
#include "daxa/daxa.slang"

#endif
22 changes: 15 additions & 7 deletions include/daxa/daxa.slang
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,19 @@ namespace daxa
{
return value == 0;
}
SamplerState get()
{
return samplers[index()];
}
};

#if defined(DAXA_RAY_TRACING)
[[vk::binding(DAXA_ACCELERATION_STRUCTURE_BINDING, 0)]] RaytracingAccelerationStructure RayTracingAccelerationStructureTable[];
extension RaytracingAccelerationStructure
{
static RaytracingAccelerationStructure get(daxa::TlasId i) { return RayTracingAccelerationStructureTable[i.index()]; }
}

struct TlasId
{
daxa_u64 value;
Expand All @@ -165,13 +175,11 @@ namespace daxa
{
return value == 0;
}
RaytracingAccelerationStructure get()
{
return RayTracingAccelerationStructureTable[index()];
}
};

[[vk::binding(DAXA_ACCELERATION_STRUCTURE_BINDING, 0)]] RaytracingAccelerationStructure RayTracingAccelerationStructureTable[];
extension RaytracingAccelerationStructure
{
static RaytracingAccelerationStructure get(daxa::TlasId i) { return RayTracingAccelerationStructureTable[i.index()]; }
}
#endif // DAXA_RAY_TRACING

extension ByteAddressBuffer
Expand Down Expand Up @@ -211,7 +219,7 @@ namespace daxa\
TYPE<T> get_coherent() { return TYPE<T>::get_coherent(id); }\
}; \
__generic<T : ITexelElement>\
struct TYPE ## Idx\
struct TYPE ## Index\
{\
ImageViewIndex index;\
TYPE<T> get() { return TYPE<T>::get(index); }\
Expand Down
60 changes: 30 additions & 30 deletions include/daxa/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,21 +201,21 @@ namespace daxa
using Data = u32;
};
using DeviceFlags = Flags<DeviceFlagsProperties>;
struct [[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] DeviceFlagBits
struct [[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] DeviceFlagBits
{
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags NONE = {0x00000000};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags BUFFER_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = {0x1 << 0};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags CONSERVATIVE_RASTERIZATION = {0x1 << 1};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags MESH_SHADER = {0x1 << 2};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags SHADER_ATOMIC64 = {0x1 << 3};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags IMAGE_ATOMIC64 = {0x1 << 4};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags VK_MEMORY_MODEL = {0x1 << 5};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags RAY_TRACING = {0x1 << 6};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags SHADER_FLOAT16 = {0x1 << 7};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags ROBUST_BUFFER_ACCESS = {0x1 << 9};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags ROBUST_IMAGE_ACCESS = {0x1 << 10};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags DYNAMIC_STATE_3 = {0x1 << 11};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead")]] static inline constexpr DeviceFlags SHADER_ATOMIC_FLOAT = {0x1 << 12};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags NONE = {0x00000000};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags BUFFER_DEVICE_ADDRESS_CAPTURE_REPLAY_BIT = {0x1 << 0};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags CONSERVATIVE_RASTERIZATION = {0x1 << 1};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags MESH_SHADER = {0x1 << 2};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags SHADER_ATOMIC64 = {0x1 << 3};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags IMAGE_ATOMIC64 = {0x1 << 4};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags VK_MEMORY_MODEL = {0x1 << 5};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags RAY_TRACING = {0x1 << 6};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags SHADER_FLOAT16 = {0x1 << 7};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags ROBUST_BUFFER_ACCESS = {0x1 << 9};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags ROBUST_IMAGE_ACCESS = {0x1 << 10};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags DYNAMIC_STATE_3 = {0x1 << 11};
[[deprecated("Use ExplicitFeatureFlags or ImplicitFeatureFlags instead, API:3.1")]] static inline constexpr DeviceFlags SHADER_ATOMIC_FLOAT = {0x1 << 12};
};
#endif

Expand Down Expand Up @@ -323,7 +323,7 @@ namespace daxa
};

#if !DAXA_REMOVE_DEPRECATED
[[deprecated("Use create_device_2 and Instance::choose_device instead")]] DAXA_EXPORT_CXX auto default_device_score(DeviceProperties const & device_props) -> i32;
[[deprecated("Use create_device_2 and Instance::choose_device instead, API:3.1")]] DAXA_EXPORT_CXX auto default_device_score(DeviceProperties const & device_props) -> i32;

struct [[deprecated("Use DeviceInfo2 instead")]] DeviceInfo
{
Expand Down Expand Up @@ -585,27 +585,27 @@ namespace daxa
#if !DAXA_REMOVE_DEPRECATED
/// DEPRECATED:

[[deprecated("Use tlas_build_sizes or as_build_sizes Instead")]] [[nodiscard]] auto get_tlas_build_sizes(TlasBuildInfo const & info) { return tlas_build_sizes(info); }
[[deprecated("Use blas_build_sizes or as_build_sizes Instead")]] [[nodiscard]] auto get_blas_build_sizes(BlasBuildInfo const & info) { return blas_build_sizes(info); }
[[deprecated("Use buffer_memory_requirements or memory_requirements Instead")]] [[nodiscard]] auto get_memory_requirements(BufferInfo const & info) const { return buffer_memory_requirements(info); }
[[deprecated("Use image_memory_requirements or memory_requirements Instead")]] [[nodiscard]] auto get_memory_requirements(ImageInfo const & info) const { return image_memory_requirements(info); }
[[deprecated("Use buffer_info or info instead")]] [[nodiscard]] auto info_buffer(BufferId id) const { return buffer_info(id); }
[[deprecated("Use image_info or info instead")]] [[nodiscard]] auto info_image(ImageId id) const { return image_info(id); }
[[deprecated("Use image_view_info or info instead")]] [[nodiscard]] auto info_image_view(ImageViewId id) const { return image_view_info(id); }
[[deprecated("Use sampler_info or info instead")]] [[nodiscard]] auto info_sampler(SamplerId id) const { return sampler_info(id); }
[[deprecated("Use tlas_info or info instead")]] [[nodiscard]] auto info_tlas(TlasId id) const { return tlas_info(id); }
[[deprecated("Use blas_info or info instead")]] [[nodiscard]] auto info_blas(BlasId id) const { return blas_info(id); }
[[deprecated("Use tlas_build_sizes or as_build_sizes Instead, API:3.0")]] [[nodiscard]] auto get_tlas_build_sizes(TlasBuildInfo const & info) { return tlas_build_sizes(info); }
[[deprecated("Use blas_build_sizes or as_build_sizes Instead, API:3.0")]] [[nodiscard]] auto get_blas_build_sizes(BlasBuildInfo const & info) { return blas_build_sizes(info); }
[[deprecated("Use buffer_memory_requirements or memory_requirements Instead, API:3.0")]] [[nodiscard]] auto get_memory_requirements(BufferInfo const & info) const { return buffer_memory_requirements(info); }
[[deprecated("Use image_memory_requirements or memory_requirements Instead, API:3.0")]] [[nodiscard]] auto get_memory_requirements(ImageInfo const & info) const { return image_memory_requirements(info); }
[[deprecated("Use buffer_info or info instead, API:3.0")]] [[nodiscard]] auto info_buffer(BufferId id) const { return buffer_info(id); }
[[deprecated("Use image_info or info instead, API:3.0")]] [[nodiscard]] auto info_image(ImageId id) const { return image_info(id); }
[[deprecated("Use image_view_info or info instead, API:3.0")]] [[nodiscard]] auto info_image_view(ImageViewId id) const { return image_view_info(id); }
[[deprecated("Use sampler_info or info instead, API:3.0")]] [[nodiscard]] auto info_sampler(SamplerId id) const { return sampler_info(id); }
[[deprecated("Use tlas_info or info instead, API:3.0")]] [[nodiscard]] auto info_tlas(TlasId id) const { return tlas_info(id); }
[[deprecated("Use blas_info or info instead, API:3.0")]] [[nodiscard]] auto info_blas(BlasId id) const { return blas_info(id); }

template <typename T>
[[deprecated("Use buffer_host_address_as instead")]] [[nodiscard]] auto get_host_address_as(BufferId id) const
[[deprecated("Use buffer_host_address_as instead, API:3.0")]] [[nodiscard]] auto get_host_address_as(BufferId id) const
{
return buffer_host_address_as<T>(id);
}

[[deprecated("Use buffer_host_address instead")]] [[nodiscard]] auto get_host_address(BufferId id) const { return buffer_host_address(id); }
[[deprecated("Use buffer_device_address or device_address instead")]] [[nodiscard]] auto get_device_address(BufferId id) const { return buffer_device_address(id); }
[[deprecated("Use blas_device_address or device_address instead")]] [[nodiscard]] auto get_device_address(BlasId id) const { return blas_device_address(id); }
[[deprecated("Use tlas_device_address or device_address instead")]] [[nodiscard]] auto get_device_address(TlasId id) const { return tlas_device_address(id); }
[[deprecated("Use buffer_host_address instead, API:3.0")]] [[nodiscard]] auto get_host_address(BufferId id) const { return buffer_host_address(id); }
[[deprecated("Use buffer_device_address or device_address instead, API:3.0")]] [[nodiscard]] auto get_device_address(BufferId id) const { return buffer_device_address(id); }
[[deprecated("Use blas_device_address or device_address instead, API:3.0")]] [[nodiscard]] auto get_device_address(BlasId id) const { return blas_device_address(id); }
[[deprecated("Use tlas_device_address or device_address instead, API:3.0")]] [[nodiscard]] auto get_device_address(TlasId id) const { return tlas_device_address(id); }
#endif

protected:
Expand Down
6 changes: 3 additions & 3 deletions include/daxa/instance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ namespace daxa
Instance() = default;

#if !DAXA_REMOVE_DEPRECATED
[[deprecated("Use create_device_2 instead")]] [[nodiscard]] auto create_device(DeviceInfo const & device_info) -> Device;
[[deprecated("Use create_device_2 instead, API:3.0")]] [[nodiscard]] auto create_device(DeviceInfo const & device_info) -> Device;
#endif
[[nodiscard]] auto create_device_2(DeviceInfo2 const & device_info) -> Device;

/// Convenience function to pick a physical device.
/// Picks first supported device that satisfies the given device info and desired implicit features.
auto choose_device(ImplicitFeatureFlags desired_features, DeviceInfo2 const & base_info) -> DeviceInfo2;
[[nodiscard]] auto choose_device(ImplicitFeatureFlags desired_features, DeviceInfo2 const & base_info) -> DeviceInfo2;

auto list_devices_properties() -> std::span<DeviceProperties const>;
[[nodiscard]] auto list_devices_properties() -> std::span<DeviceProperties const>;

/// THREADSAFETY:
/// * reference MUST NOT be read after the object is destroyed.
Expand Down
8 changes: 4 additions & 4 deletions include/daxa/pipeline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ namespace daxa
Span<ShaderInfo const> closest_hit_shaders = {};
Span<ShaderInfo const> miss_hit_shaders = {};
Span<RayTracingShaderGroupInfo const> shader_groups = {};
u32 max_ray_recursion_depth;
u32 push_constant_size = {};
u32 max_ray_recursion_depth = {};
u32 push_constant_size = DAXA_MAX_PUSH_CONSTANT_BYTE_SIZE;
SmallString name = {};
};

Expand Down Expand Up @@ -97,7 +97,7 @@ namespace daxa
struct ComputePipelineInfo
{
ShaderInfo shader_info = {};
u32 push_constant_size = {};
u32 push_constant_size = DAXA_MAX_PUSH_CONSTANT_BYTE_SIZE;
SmallString name = {};
};

Expand Down Expand Up @@ -191,7 +191,7 @@ namespace daxa
Optional<DepthTestInfo> depth_test = {};
Optional<TesselationInfo> tesselation = {};
RasterizerInfo raster = {};
u32 push_constant_size = {};
u32 push_constant_size = DAXA_MAX_PUSH_CONSTANT_BYTE_SIZE;
SmallString name = {};
};

Expand Down
Loading