[Mesa-dev] [PATCH] glx/dri2: Respect --enable/disable-driglx-direct

Jeremy Huddleston Sequoia jeremy at outersquare.org
Sat Feb 15 18:00:58 PST 2014


Mesa master hasn't built for OSX for over a year now, unfortunately, but I agree excluding in Makefile.am is preferable to cpp-guards.  Hopefully "someone" will have the time and patience to get it working again in the near future.

--Jeremy

Sent from my iPad

> On Feb 13, 2014, at 8:29, Ian Romanick <idr at freedesktop.org> wrote:
> 
>> On 02/13/2014 02:11 AM, Daniel Martin wrote:
>> Encapsulate the code in src/glx/dri2_query_renderer.c within a
>> 
>>    #ifdef GLX_DIRECT_RENDERING
>> 
>> as done in src/glx/dri2*.c.
> 
> I noticed a couple things, and I'm not sure what the right answer is.
> 
> First, dri2_glx.c and dri3_glx.c use:
> 
> #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
> 
> but dri2.c uses
> 
> #ifdef GLX_DIRECT_RENDERING
> 
> I'm not sure why they're different or which is actually correct.
> 
> Second, couldn't we just not build the file at all when
> GLX_DIRECT_RENDERING isn't selected?  Do something like the following in
> src/glx/Makefile.am:
> 
> if HAVE_DRI2 || HAVE_DRI3
> libglx_la_SOURCES += \
>          dri2_glx.c
>          dri2.c
>          dri2_query_renderer.c
> endif
> 
> (and remove those files from the default libglx_la_SOURCES list, of course).
> 
>> Signed-off-by: Daniel Martin <consume.noise at gmail.com>
>> ---
>> ... compile it, when enabled only.
>> 
>> Cheers,
>>    Daniel
>> 
>> src/glx/dri2_query_renderer.c |    5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>> 
>> diff --git a/src/glx/dri2_query_renderer.c b/src/glx/dri2_query_renderer.c
>> index b50a202..3bc90c7 100644
>> --- a/src/glx/dri2_query_renderer.c
>> +++ b/src/glx/dri2_query_renderer.c
>> @@ -20,6 +20,9 @@
>>  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
>>  * DEALINGS IN THE SOFTWARE.
>>  */
>> +
>> +#ifdef GLX_DIRECT_RENDERING
>> +
>> #include "glxclient.h"
>> #include "glx_error.h"
>> #include "xf86drm.h"
>> @@ -95,3 +98,5 @@ dri2_query_renderer_string(struct glx_screen *base, int attribute,
>> 
>>    return psc->rendererQuery->queryString(psc->driScreen, dri_attribute, value);
>> }
>> +
>> +#endif /* GLX_DIRECT_RENDERING */
> 


More information about the mesa-dev mailing list