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/glm.hpp>
#include <glm/gtx/quaternion.hpp> #include <glm/gtx/quaternion.hpp>
#include <atomic>
using c8 = char; using c8 = char;
using u8 = uint8_t; using u8 = uint8_t;
using u16 = uint16_t; using u16 = uint16_t;

View File

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

View File

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