Fix bug which does sizeof for pointer.

Change to use strcmp since memcmp is confusing here.

Signed-off-by: Lepton Wu <lepton@chromium.org>
Tested-by: Jakob Bornecrantz <jakob@collabora.com>
Reviewed-by: Jakob Bornecrantz <jakob@collabora.com>
macos/master
Lepton Wu 7 years ago committed by Dave Airlie
parent a9f6bb03de
commit 2a5502bf73
  1. 2
      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);

Loading…
Cancel
Save