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

Emil Velikov emil.l.velikov at gmail.com
Sun Feb 16 17:15:57 PST 2014


On 16/02/14 02:00, Jeremy Huddleston Sequoia wrote:
> 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.
> 
Hi Jeremy

A while back, I was pondering on converting the apple glx to automake,
but the biggest obstacle was the complete lack of testing (compile or
runtime). iirc you have a tinderbox at x.org but it does not build mesa.
Do you mind updating it ?

I might get back to that over the next few weeks, so keep an eye open.

-Emil

> --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 */
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list