Fix for deletes, add some debugging stuff

This commit is contained in:
Henrik Rydgård committed 2018-01-27 15:10:17 +01:00
1 parent e5d571c25a
commit 57615344e4
4 files changed
+51 -34

No files matched your search

+2
View File
@@ -187,6 +187,7 @@ void GLQueueRunner::RunInitSteps(const std::vector<GLRInitStep> &steps) {
case GLRInitStepType::TEXTURE_IMAGE:
{
GLRTexture *tex = step.texture_image.texture;
_assert_msg_(G3D, tex->canary == GLRTexture::CanaryValue, "Canary has bad value %08x in texture %p", tex->canary, tex);
CHECK_GL_ERROR_IF_DEBUG();
if (boundTexture != tex->texture) {
glBindTexture(tex->target, tex->texture);
@@ -624,6 +625,7 @@ void GLQueueRunner::PerformRenderPass(const GLRStep &step) {
}
if (c.texture.texture) {
if (curTex[slot] != c.texture.texture) {
_assert_msg_(G3D, c.texture.texture->canary == GLRTexture::CanaryValue, "Canary has bad value %08x in texture %p", c.texture.texture->canary, c.texture.texture);
glBindTexture(c.texture.texture->target, c.texture.texture->texture);
curTex[slot] = c.texture.texture;
}