Skip to content

Commit

Permalink
Fix the clang build
Browse files Browse the repository at this point in the history
  • Loading branch information
godlikepanos committed Jun 12, 2024
1 parent 62a2292 commit b09aa3e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AnKi/Gr/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ class ShaderReflection
void validate() const
{
m_descriptor.validate();
for(VertexAttributeSemantic semantic : EnumIterable<VertexAttributeSemantic>())
for([[maybe_unused]] VertexAttributeSemantic semantic : EnumIterable<VertexAttributeSemantic>())
{
ANKI_ASSERT(!m_vertex.m_vertexAttributeMask.get(semantic) || m_vertex.m_vkVertexAttributeLocations[semantic] != kMaxU8);
}
Expand Down
5 changes: 2 additions & 3 deletions AnKi/Gr/Vulkan/VkCommandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ void CommandBuffer::traceRays(const BufferView& sbtBuffer, U32 sbtRecordSize32,
ANKI_ASSERT(hitGroupSbtRecordCount > 0);
ANKI_ASSERT(width > 0 && height > 0 && depth > 0);
ANKI_ASSERT(self.m_rtProg);
const ShaderProgramImpl& sprog = static_cast<const ShaderProgramImpl&>(*self.m_rtProg);
[[maybe_unused]] const ShaderProgramImpl& sprog = static_cast<const ShaderProgramImpl&>(*self.m_rtProg);

ANKI_ASSERT(rayTypeCount == sprog.getMissShaderCount() && "All the miss shaders should be in use");
ANKI_ASSERT((hitGroupSbtRecordCount % rayTypeCount) == 0);
Expand Down Expand Up @@ -1087,8 +1087,7 @@ void CommandBuffer::setPushConstants(const void* data, U32 dataSize)
{
ANKI_VK_SELF(CommandBufferImpl);
ANKI_ASSERT(data && dataSize && dataSize % 16 == 0);
const ShaderProgramImpl& prog = self.getBoundProgram();
ANKI_ASSERT(prog.getReflection().m_descriptor.m_pushConstantsSize == dataSize
ANKI_ASSERT(static_cast<self.getBoundProgram()>(prog).getReflection().m_descriptor.m_pushConstantsSize == dataSize
&& "The bound program should have push constants equal to the \"dataSize\" parameter");

self.commandCommon();
Expand Down
4 changes: 2 additions & 2 deletions AnKi/Gr/Vulkan/VkGraphicsState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ void GraphicsPipelineFactory::flushState(GraphicsStateTracker& state, VkCommandB
// Find the PSO
VkPipeline pso = VK_NULL_HANDLE;
{
RLockGuard lock(m_mtx);
RLockGuard<RWMutex> lock(m_mtx);

auto it = m_map.find(state.m_globalHash);
if(it != m_map.getEnd())
Expand Down Expand Up @@ -394,7 +394,7 @@ void GraphicsPipelineFactory::flushState(GraphicsStateTracker& state, VkCommandB

// Now try to add the PSO to the hashmap
{
WLockGuard lock(m_mtx);
WLockGuard<RWMutex> lock(m_mtx);

auto it = m_map.find(state.m_globalHash);
if(it == m_map.getEnd())
Expand Down

0 comments on commit b09aa3e

Please sign in to comment.