From ec454b9df0c94473faa181a93245e7a9acfe579a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 23 Jul 2018 10:07:20 +1000 Subject: [PATCH] renderer: fix ssbo != -1 comparison. Use the GL define instead. --- src/vrend_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 4086abd..0ede536 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -3226,7 +3226,7 @@ static void vrend_draw_bind_ssbo_shader(struct vrend_context *ctx, int shader_ty res = (struct vrend_resource *)ssbo->res; glBindBufferRange(GL_SHADER_STORAGE_BUFFER, i, res->id, ssbo->buffer_offset, ssbo->buffer_size); - if (ctx->sub->prog->ssbo_locs[shader_type][i] != -1) + if (ctx->sub->prog->ssbo_locs[shader_type][i] != GL_INVALID_INDEX) glShaderStorageBlockBinding(ctx->sub->prog->id, ctx->sub->prog->ssbo_locs[shader_type][i], i); } }