From 8518e135ff5c312bd5a3b496d400c751aa3bd5b3 Mon Sep 17 00:00:00 2001 From: chai Date: Sun, 8 Dec 2019 02:39:57 +0800 Subject: =?UTF-8?q?*=E5=85=89=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/device.c') diff --git a/src/core/device.c b/src/core/device.c index f6b1a4e..b9c024c 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -289,7 +289,7 @@ void ssr_draw(ssr_PrimitiveType primitive) { state.uniforms.mv = &mv; uint varying_flag = state.program->varying_flag; - bool use_extra_varyings = varying_flag & VARYING_EXTRA; + bool use_extra_varyings = (varying_flag & VARYING_EXTRA) != 0; /*prepare registers if necessary*/ if (use_extra_varyings) { @@ -362,7 +362,7 @@ void ssr_draw(ssr_PrimitiveType primitive) { } else { if (clipped_buffer.count >= 3) { ClippedVert* vt0 = &clipped_buffer.vertices[0], *vt1, *vt2; - for (int i = 1; i <= clipped_buffer.count - 2; ++i) { /*0->i->i+1*/ + for (int i = 1; i <= clipped_buffer.count - 2; ++i) { vt1 = &clipped_buffer.vertices[i]; vt2 = &clipped_buffer.vertices[i + 1]; h0 = &vt0->clip_coord; h1 = &vt1->clip_coord; h2 = &vt2->clip_coord; -- cgit v1.1-26-g67d0