[virglrenderer-devel] [PATCH] Fix bug which does sizeof for pointer.
Lepton Wu
lepton at chromium.org
Wed Mar 21 21:24:56 UTC 2018
Change to use strcmp since memcmp is confusing here.
Signed-off-by: Lepton Wu <lepton at chromium.org>
---
src/vrend_shader.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vrend_shader.c b/src/vrend_shader.c
index a71890b..9102fb9 100644
--- a/src/vrend_shader.c
+++ b/src/vrend_shader.c
@@ -2567,7 +2567,7 @@ static char *emit_ios(struct dump_ctx *ctx, char *glsl_hdr)
/* OpenGL ES do not support 1D texture
* so we use a 2D texture with a parameter set to 0.5
*/
- if (ctx->cfg->use_gles && !memcmp(stc, "1D", sizeof(stc)))
+ if (ctx->cfg->use_gles && !strcmp(stc, "1D"))
snprintf(buf, 255, "uniform %csampler2D %ssamp%d;\n", ptc, sname, i);
else
snprintf(buf, 255, "uniform %csampler%s %ssamp%d;\n", ptc, stc, sname, i);
--
2.17.0.rc0.231.g781580f067-goog
More information about the virglrenderer-devel
mailing list