Fixes added for clang.

- Enum values now assigned with C-enums instead of type-safe enums.
- Atomic included at `constants.h` so it's available everywhere.
- Fixed CommitManager forward declaration.
- Added `scalarLayout` option to slang compiler.
This commit is contained in:
Anish Bhobe 2025-05-13 13:00:11 +02:00
parent cc4cffe989
commit 1f8f102ee1
3 changed files with 13 additions and 8 deletions

View File

@ -13,6 +13,8 @@
#include <glm/glm.hpp>
#include <glm/gtx/quaternion.hpp>
#include <atomic>
using c8 = char;
using u8 = uint8_t;
using u16 = uint16_t;

View File

@ -272,14 +272,14 @@ struct VertexInput
enum class ShaderType
{
eInvalid = 0,
eVertex = vk::ShaderStageFlagBits::eVertex,
eTesselationControl = vk::ShaderStageFlagBits::eTessellationControl,
eTesselationEvaluation = vk::ShaderStageFlagBits::eTessellationEvaluation,
eGeometry = vk::ShaderStageFlagBits::eGeometry,
eFragment = vk::ShaderStageFlagBits::eFragment,
eCompute = vk::ShaderStageFlagBits::eCompute,
eTask = vk::ShaderStageFlagBits::eTaskEXT,
eMesh = vk::ShaderStageFlagBits::eMeshEXT,
eVertex = VK_SHADER_STAGE_VERTEX_BIT,
eTesselationControl = VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT,
eTesselationEvaluation = VK_SHADER_STAGE_TESSELLATION_EVALUATION_BIT,
eGeometry = VK_SHADER_STAGE_GEOMETRY_BIT,
eFragment = VK_SHADER_STAGE_FRAGMENT_BIT,
eCompute = VK_SHADER_STAGE_COMPUTE_BIT,
eTask = VK_SHADER_STAGE_TASK_BIT_EXT,
eMesh = VK_SHADER_STAGE_MESH_BIT_EXT,
eMax,
};
@ -473,6 +473,8 @@ struct Frame
~Frame() = default;
};
class CommitManager;
class Device final
{
public: // TODO: Temp

View File

@ -1070,6 +1070,7 @@ systems::Device::Device(const DeviceCreateInfo &createInfo)
std::array compilerOptions = {
useOriginalEntrypointNames,
bindlessSpaceIndex,
scalarLayout,
};
const slang::TargetDesc spirvTargetDesc = {