[Mesa-dev] [PATCH 0/9] remove mfeatures.h file

Brian Paul brianp at vmware.com
Wed Feb 27 16:03:53 PST 2013


On 02/26/2013 10:16 AM, Andreas Boll wrote:
> 2013/2/26 Brian Paul<brianp at vmware.com>:
>> OK, I have a git tree on fd.o with this patch series (plus updates to
>> intel_screen.c and configure.ac).
>
> With your configure.ac patch API_DEFINES seems now unused.
> But from what I can see src/gallium/targets/egl-static/egl_st.c used
> it to define FEATURE_{GL,ES1,ES2}

I think we went a bit too far with "FEATURE" removal here.

When the user specifies some combination of --disable-opengl 
--enable-gles1 --enable-gles2 --enable-openvg on the command line, 
that's going to control whether or not some components are built (like 
the vega state tracker).

So I think that the configure script should still define FEATURE_GL, 
FEATURE_ES1, FEATURE_VG, etc. because in gallium targets such as 
egl-static we want to test for those CPP symbols so we don't introduce 
function calls to non-existant objects.

So code like this in egl-static/egl_st.c should probably stay as-is:

    switch (api) {
    case ST_API_OPENGL:
#if FEATURE_GL || FEATURE_ES1 || FEATURE_ES2
#if _EGL_EXTERNAL_GL
       stapi = egl_st_load_gl();
#else
       stapi = st_gl_api_create();
#endif
#endif
       break;
    case ST_API_OPENVG:
#if FEATURE_VG
       stapi = (struct st_api *) vg_api_get();
#endif
       break;
    default:
       assert(!"Unknown API Type\n");
       break;
    }

The point of the branch was to get rid of the mfeatures.h file.  I 
think I'll make a new remove-mfeatures-2 branch and stop short of 
changing the configure/scons files.  It might be a few days...

-Brian


More information about the mesa-dev mailing list