Bug 83149 - Syntax error in setup_glsl_blit_framebuffer() with VS2012
Summary: Syntax error in setup_glsl_blit_framebuffer() with VS2012
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: 10.2
Hardware: x86 (IA32) Windows (All)
: medium critical
Assignee: mesa-dev
QA Contact:
Depends on:
Reported: 2014-08-27 15:12 UTC by Charles Huber
Modified: 2014-09-03 22:41 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Note You need to log in before you can comment on or make changes to this bug.
Description Charles Huber 2014-08-27 15:12:49 UTC
Using the 10.2.6 release zip (ftp://ftp.freedesktop.org/pub/mesa/10.2.6/MesaLib-10.2.6.zip) with the VS2012 compiler.

scons invocation:
LLVM=c:/llvm /c/Python27/python /c/Python27/Scripts/scons.py build=release machine=x86 platform=windows gles=yes llvm=yes MSVC_VERSION=11.0

This line:

unsigned texcoord_size = 2 + (src_rb->Depth > 1 ? 1 : 0);

in setup_glsl_blit_framebuffer() results in a syntax error:

src\mesa\drivers\common\meta_blit.c(331) : error C2143: syntax error : missing ';' before 'type'

Moving the declaration to the top of the function fixes the error:

   unsigned texcoord_size = 0;

   /* target = GL_TEXTURE_RECTANGLE is not supported in GLES 3.0 */
   assert(_mesa_is_desktop_gl(ctx) || target == GL_TEXTURE_2D);

   texcoord_size = 2 + (src_rb->Depth > 1 ? 1 : 0);
Comment 1 Brian Paul 2014-09-03 22:41:48 UTC
Fixed with commit 7ffc8556ca81976fe4f92cda5253b1685149748a on the 10.2 branch.  This is a simple cherry-pick from the master branch.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.