Thomas Hellström wrote:
Thomas Hellström wrote:
Brian Paul wrote:
Yeah, I think code at lines 204 and 566 is bogus.
In drm.h:
#if defined(__linux__)
typedef unsigned int drm_handle_t;
#else
typedef unsigned long drm_handle_t; /**< To mapped regions */
#endif
But in XF86dri.c we have:
*hSAREA = rep.hSAREALow;
#ifdef LONG64
*hSAREA |= ((drm_handle_t)rep.hSAREAHigh) << 32;
#endif
I think this would be better and more robust:
*hSAREA = rep.hSAREALow;
if (sizeof(drm_handle_t) == 8) {
*hSAREA |= ((drm_handle_t) rep.hSAREAHigh) << 32;
}
Any comments from the DRI/DRM guys?
I have been looking at the code as it is present also in the via XvMC
libs.
Seems like the correct solution.
/Thomas
Hmm, apparently I was a bit quick on the answer there. While the
generated code should be correct, the compiler isn't smart enough to
silence the warning. In fact, this should generate a warning even on 32
bit code.
I need to do the following to make it quiet:
#ifdef LONG64
if (sizeof(drm_handle_t) == 8) {
*hFrameBuffer |= ((unsigned long)rep.hFrameBufferHigh) << 32;
}
#endif
I already checked in a fix. I just use a variable initialized to 32
to avoid the warning.
-Brian
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel