Skip to content

Commit

Permalink
[Misc] Fixed compile errors with Clang and GCC.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Dec 29, 2024
1 parent 2e893cf commit 2589b42
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sources/Renderer/OpenGL/RenderState/GLPipelineLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void GLPipelineLayout::BuildDynamicResourceBindings(const PipelineLayoutDescript
if (newBinding.IsSSBO())
newBinding.ssboIndex = ssboCounter++;
else
newBinding.ssboIndex = ~0u;
newBinding.ssboIndex = 0xFFFF;
}
bindings_.push_back(newBinding);
resourceNames_.push_back(desc.name.c_str());
Expand Down
3 changes: 2 additions & 1 deletion sources/Renderer/OpenGL/RenderState/GLResourceHeap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ struct GLTexBuffer
static constexpr GLenum k_maxGLInternalFormatValue = ((1u << k_heapSegmentInternalFormatBits) - 1);

#define LLGL_ASSERT_GLINTERNALFORMAT_VALUE(VALUE) \
static_assert((VALUE) <= k_maxGLInternalFormatValue, "Value of " ## #VALUE ## " is exceeding bitsize for internal format in GLResourceHeap segments")
static_assert((VALUE) <= k_maxGLInternalFormatValue, "Value of " #VALUE " is exceeding bitsize for internal format in GLResourceHeap segments")

LLGL_ASSERT_GLINTERNALFORMAT_VALUE(GL_R32F);
LLGL_ASSERT_GLINTERNALFORMAT_VALUE(GL_R32I);
Expand Down Expand Up @@ -776,6 +776,7 @@ void GLResourceHeap::WriteResourceView(const ResourceViewDescriptor& desc, const
switch (segment->type)
{
case GLResourceType_Invalid:
case GLResourceType_End:
/* Ignore */
break;
case GLResourceType_UBO:
Expand Down
4 changes: 4 additions & 0 deletions sources/Renderer/OpenGL/Shader/GLShaderProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -904,17 +904,21 @@ void GLShaderProgram::QueryTexBufferNames(GLuint program, std::set<std::string>&
/* Map sampler buffer and image buffer names to output sets */
switch (type)
{
#if defined(GL_SAMPLER_BUFFER) && defined(GL_INT_SAMPLER_BUFFER) && defined(GL_UNSIGNED_INT_SAMPLER_BUFFER)
case GL_SAMPLER_BUFFER:
case GL_INT_SAMPLER_BUFFER:
case GL_UNSIGNED_INT_SAMPLER_BUFFER:
samplerBufferNames.insert(std::move(uniformName));
break;
#endif

#if defined(GL_IMAGE_BUFFER) && defined(GL_INT_IMAGE_BUFFER) && defined(GL_UNSIGNED_INT_IMAGE_BUFFER)
case GL_IMAGE_BUFFER:
case GL_INT_IMAGE_BUFFER:
case GL_UNSIGNED_INT_IMAGE_BUFFER:
imageBufferNames.insert(std::move(uniformName));
break;
#endif

default:
break;
Expand Down

0 comments on commit 2589b42

Please sign in to comment.