aboutsummaryrefslogtreecommitdiff
path: root/src/platform
diff options
context:
space:
mode:
Diffstat (limited to 'src/platform')
-rw-r--r--src/platform/opengl/opengl_device.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/platform/opengl/opengl_device.cpp b/src/platform/opengl/opengl_device.cpp
index 7ef0ba1..614e515 100644
--- a/src/platform/opengl/opengl_device.cpp
+++ b/src/platform/opengl/opengl_device.cpp
@@ -120,11 +120,17 @@ namespace Donut::RHI
{
GLuint bi = glGetUniformBlockIndex(m_prog, r.name.c_str());
if (bi != GL_INVALID_INDEX) glUniformBlockBinding(m_prog, bi, r.binding);
+ // Not found: the ConstantBuffer<> type name in the shader no longer
+ // matches this resource string, so the UBO silently won't bind.
+ else DONUT_WARN("GL RHI: shader '{}' has no uniform block '{}' (binding {})",
+ d.shader, r.name, r.binding);
}
else // Texture: point the sampler at texture unit == binding
{
GLint loc = glGetUniformLocation(m_prog, r.name.c_str());
if (loc >= 0) glUniform1i(loc, (GLint)r.binding);
+ else DONUT_WARN("GL RHI: shader '{}' has no sampler '{}' (unit {})",
+ d.shader, r.name, r.binding);
}
}
glUseProgram(0);